@charset "UTF-8";

/* 그린 파스텔 테마 색상 */
:root {
    --main-green: #81c784;
    --accent-green: #a5d6a7;
    --light-green: #f1f8e9;
    --table-hover: #c8e6c9;
    --dark-green: #388e3c;
    --danger-red: #e57373;
    --danger-hover: #d32f2f;
}

/* =============================
   공통 스타일 (리셋, 레이아웃, 버튼, 폼, 컨테이너 등)
   ============================= */
/* 0) 공통: 유동 레이아웃 기본 (폰트 크기, 컨트롤 크기 상대 단위 적용) */
html { box-sizing: border-box; font-size: 4vw; }
body { margin: 0; font-family: system-ui, sans-serif; font-size: 1rem; }
img, video { max-width: 100%; height: auto; }
*, *:before, *:after { box-sizing: inherit; }

/* 1) 모바일 우선: 한 줄 레이아웃 등 (기본 적용) */
.main { display: grid; gap: 1rem; padding: 1rem; grid-template-columns: 1fr; }
.card-list { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

.menu-toggle, .mobile-menu-close-btn {
  font-size: 2.5rem;
  padding: 1.2vw 2vw;
  min-width: 44px;
  min-height: 44px;
}
.mobile-menu-login-btn {
  font-size: 1.2rem;
  padding: 1vw 3vw;
  min-width: 44px;
  min-height: 44px;
}
.mobile-menu-list li a {
  font-size: 1.3rem;
  padding: 2vw 3vw;
}

/* 2) 태블릿~데스크탑 전용 스타일 (600px 이상부터 일부 변경) */
@media (min-width: 600px) {
  html { font-size: 22px; }
  .menu-toggle, .mobile-menu-close-btn { font-size: 3rem; }
  .mobile-menu-login-btn { font-size: 1.4rem; }
  .mobile-main-title { font-size: 2.5rem; }
  .mobile-menu-list li a { font-size: 1.5rem; }
}
@media (min-width: 1024px) {
  html { font-size: 24px; }
  .main { grid-template-columns: 240px 1fr; }
  .card-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  html { font-size: 26px; }
  .card-list { grid-template-columns: repeat(3, 1fr); }
}

/* 모바일 대응: 1024px 미만까지 적용 */
@media (max-width: 1023px) {
  body {
    padding-top: 72px; /* 모바일 상단바 높이만큼 여백 추가 */
  }
  .main-container {
    padding-top: 0;
  }
  h2 {
    font-size: 2.2rem;
    text-align: center;
  }
  .option-item {
    padding: 2vw;
  }
  .option-details input, .option-details select {
    font-size: 1.1rem;
    max-width: 100%;
  }
}

/* 전체 컨테이너 */
.main-container {
    max-width: 480px;
    width: 96vw;
    margin: 0 auto;
    padding: 20px;
    font-family: sans-serif;
}

/* 입력 필드 그룹 */
.input-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.input-group.label {
	font-weight: bold;
	margin-bottom: 5px;
}

.input-group input, .input-group select {
	padding: 10px;
	font-size: 16px;
	width: 100%;
	box-sizing: border-box;
}

/* 이메일 행: 이메일 입력, @, 선택 및 사용자 지정 입력의 수평 레이아웃 */
.email-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.email-row input[type="text"],
.email-row select {
    min-width: 0;
    flex: 1 1 0;
    font-size: 1rem;
    padding: 10px;
    box-sizing: border-box;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
}
.email-row span {
    flex: 0 0 auto;
    font-size: 1.1rem;
    margin: 0 2px;
    vertical-align: middle;
}
#email_domain_custom {
    display: none;
    flex: 1 1 0;
    min-width: 0;
    font-size: 1rem;
    padding: 10px;
    vertical-align: middle;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.email-row.custom-domain-active #email_domain_custom {
    display: inline-block;
}
@media (max-width: 600px) {
    .email-row {
        /* 휴대폰에서 세로로 쌓이지 않고 가로로 유지하도록 함 */
        flex-direction: row;
        gap: 8px;
        align-items: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .email-row input[type="text"],
    .email-row select,
    #email_domain_custom {
        flex: 0 1 auto;
        min-width: 64px;
        font-size: 1rem;
        padding: 10px;
        margin-top: 0;
        margin-bottom: 0;
    }
    /* 작은 화면에서 이메일 아이디에 더 많은 공간을 할당 */
    #email_id { flex: 1 1 auto; min-width: 100px; }
}

/* 주소 그룹: 주소 필드를 전체 너비로 설정 */
.address-group input[type="text"] {
    width: 100%;
    margin-bottom: 8px;
    font-size: 1rem;
    padding: 10px;
    box-sizing: border-box;
}
.address-group > div {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

/* 버튼 기본 스타일 */
.btn {
	padding: 12px;
	font-size: 16px;
	width: 100%;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	margin-bottom: 10px;
}

.btn-primary {
	background-color: var(--main-green);
	color: var(--dark-green);
}

.btn-primary:hover {
	background-color: var(--dark-green);
	color: #fff;
}

.btn-secondary {
	background-color: var(--accent-green);
	color: var(--dark-green);
}

.btn-secondary:hover {
	background-color: var(--main-green);
	color: #fff;
}

/* 결과 다이얼로그 */
.dialog {
	position: fixed;
	top: 5%;
	left: 5%;
	right: 5%;
	bottom: 5%;
	background-color: white;
	border: 2px solid #007bff;
	padding: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	z-index: 9999;
	display: none;
	overflow-y: auto;
	min-height: 100px;
}

.dialog-header {
	text-align: center;
	font-size: 20px;
	font-weight: bold;
	margin-bottom: 15px;
	color: #333;
}

.dialog-footer {
	text-align: center;
	margin-top: 20px;
}

.btn-close {
	padding: 10px 20px;
	background-color: dimgray;
	color: white;
	border: none;
	border-radius: 5px;
	font-size: 16px;
	cursor: pointer;
}

.btn-close:hover {
	background-color: #444;
}

/* 결과 다이얼로그 (modal fragment styling) */
.modal-dialog {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    display: none; /* dialogManager will set display:flex */
    align-items: center;
    justify-content: center;
    /* 전역 요소보다 충분히 높은 스태킹 컨텍스트를 보장 (보수적 값) */
    z-index: 11000;
    padding: 20px; /* breathing room on small screens */
    /* 모달 자체가 포인터 이벤트를 받을 수 있도록 명시 */
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.56);
    backdrop-filter: none;
    /* 백드롭이 패널보다 아래에 있도록 명시적인 z-index 설정 */
    z-index: 11000;
}

.modal-panel {
    position: relative;
    z-index: 11001; /* 패널이 백드롭 위에 오도록 보장 (보수적 값) */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    width: 60vw; /* target: 60% of viewport width */
    max-width: 960px;
    height: 60vh; /* target: 60% of viewport height */
    max-height: 90vh;
    padding: 20px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    /* 패널 내부 요소가 클릭될 수 있도록 포인터 이벤트 허용 */
    pointer-events: auto;
}

/* Header/body/footer inside modal-panel */
.modal-header { padding-bottom: 8px; border-bottom: none; }
.modal-body { flex: 1 1 auto; overflow-y: auto; margin-top: 8px; }
.modal-footer { padding-top: 10px; text-align: center; }

/* Small screens: make dialog nearly full-width and height auto */
@media (max-width: 720px) {
    .modal-panel {
        width: 92vw;
        height: auto;
        max-height: 86vh;
        padding: 14px;
    }
}

/* 콤보박스 스타일 - 그린 파스텔 테마 (공용) */
select, .custom-select, .input-group select, .email-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--accent-green);
    color: var(--dark-green);
    border: 2px solid var(--main-green);
    border-radius: 6px;
    padding: 10px 38px 10px 12px;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(129, 199, 132, 0.08);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 7.5L9 12L13.5 7.5' stroke='%23388e3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 22px 22px;
}
select:focus, .custom-select:focus, .input-group select:focus, .email-row select:focus {
    border-color: var(--dark-green);
    box-shadow: 0 0 0 2px var(--main-green);
}
select option, .custom-select option {
    background: #fff;
    color: var(--dark-green);
}
/* iOS Safari fix: hide default arrow */
select::-webkit-inner-spin-button,
select::-webkit-outer-spin-button,
select::-webkit-search-decoration {
    display: none;
    -webkit-appearance: none;
}

/* 네비게이션 전용 스타일 (nav.jsp) */
/* Custom green navbar for Bootstrap 5 */
.navbar-green {
    background-color: var(--main-green) !important;
    color: #fff;
}
.navbar-green .navbar-brand,
.navbar-green .nav-link {
    color: #fff !important;
}
.navbar-green .nav-link.active,
.navbar-green .nav-link:focus,
.navbar-green .nav-link:hover {
    color: #263238 !important;
    background-color: var(--accent-green);
    border-radius: 0.25rem;
}
.navbar-green .navbar-toggler {
    border-color: #fff;
}
.navbar-green .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.7)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- sidebar, member-menu, overlay 스타일 --- */
.sidebar-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 1040;
  display: none;
}
.sidebar-menu {
  position: fixed;
  top: 0; right: -300px;
  width: 300px; max-width: 80vw;
  height: 100vh;
  background: #176a3a;
  color: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.15);
  z-index: 1050;
  transition: right 0.3s;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-menu.open { right: 0; }
.sidebar-overlay.open { display: block; }
.sidebar-header {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 1rem;
  background: #176a3a;
  border-bottom: 1px solid #145c32;
}
.sidebar-close-btn {
  background: #145c32;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 1.3rem;
  padding: 4px 16px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 0.5rem;
  transition: background 0.2s;
}
.sidebar-close-btn:hover {
  background: #1e7c4a;
  color: #fff;
}
.sidebar-user {
  padding: 1rem;
  background: #1e7c4a;
  border-bottom: 1px solid #145c32;
  min-height: 60px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
}
.sidebar-user .sidebar-btn {
  background: #145c32;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  font-size: calc(0.8rem + 0.5vw);
  cursor: pointer;
  margin: 0 1px;
  transition: background 0.2s, color 0.2s, font-size 0.2s;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: nowrap;
  min-width: 0;
  max-width: 90px;
  box-sizing: border-box;
  flex-shrink: 1;
  flex-grow: 1;
  text-align: center;
}
.sidebar-user .sidebar-btn:hover {
  background: #fff;
  color: #176a3a;
}
.sidebar-board {
  flex: 1;
  padding: 1rem 0.5rem;
}
.sidebar-board .navbar-nav {
  display: block;
  padding-left: 0;
}
.sidebar-board .nav-item {
  display: block;
  margin-bottom: 0.5rem;
}
.sidebar-board .nav-link {
  display: block;
  padding: 0.5rem 1rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  border-radius: 0.25rem;
  transition: background 0.2s;
}
.sidebar-board .nav-link:hover {
  background: #145c32;
}
.sidebar-dropdown-menu {
  display: none;
  list-style: none;
  padding-left: 1rem;
  margin: 0;
  background: #176a3a;
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: max-height 0.3s;
}
.sidebar-dropdown-menu.open {
  display: block;
  animation: fadeIn 0.2s;
}
.sidebar-dropdown-menu .dropdown-item {
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background 0.2s;
}
.sidebar-dropdown-menu .dropdown-item:hover {
  background: #145c32;
}
.member-menu {
  position: fixed;
  top: 0; right: -300px;
  width: 300px; max-width: 80vw;
  height: 100vh;
  background: #176a3a;
  color: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.15);
  z-index: 1060;
  transition: right 0.3s;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.member-menu.open { right: 0; }
.member-menu .member-header {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 1rem;
  background: #176a3a;
  border-bottom: 1px solid #145c32;
}
.member-menu .member-close-btn {
  background: #145c32;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 1.3rem;
  padding: 4px 16px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 0.5rem;
  transition: background 0.2s;
}
.member-menu .member-close-btn:hover {
  background: #1e7c4a;
  color: #fff;
}
.member-menu .member-content {
  flex: 1;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 1.1rem;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (min-width: 992px) {
  .sidebar-menu, .sidebar-overlay { display: none !important; }
  .main-sidebar {
    display: none !important;
  }
}

/* =============================
   FOOTER 전용 스타일 (footer.jsp)
   ============================= */
.main-sidebar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: clamp(36px, 7vh, 56px);
    background: #23272a;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    transition: height 0.2s;
}
.main-sidebar-section {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.main-sidebar-btn {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.main-sidebar-btn:hover {
    background: #333;
}
.main-sidebar-icon {
    font-size: 2rem;
    pointer-events: none;
}
/* 헤더 전용 스타일 (header.jsp) */
/* (header.jsp는 공통 리소스 로딩만 하므로 별도 스타일 없음) */

/* 이메일, 도메인, 성별 컨트롤 폰트 크기 정규화 */
.email-row input[type="text"],
.email-row select,
#email_domain_custom,
.input-group select {
    font-size: 16px !important;
    line-height: 1.2;
}
.email-row span {
    font-size: 16px !important;
}