/* 회원가입 페이지 main (header/footer 레이아웃 사용 시) */
.regist_main {
    padding: 120px 0 60px 0;
    min-height: 60vh;
}

/* 회원가입 본문 영역 (main.css 등과 겹치지 않도록 스코프) */
.regist_main .layout-center {
    margin: 0 auto;
    max-width: 520px;
    padding: 24px 16px;
    box-sizing: border-box;
}

.regist_main .panel {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px;
    background: #fff;
    box-sizing: border-box;
}

.regist_main .panel-title {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    font-weight: bold;
}

.regist_main .regist-error {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #fff3f3;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c00;
    font-size: 14px;
}

/* 약관 동의 섹션 (_common.css의 section padding 덮어씀) */
.regist_main .agree-section {
    margin-bottom: 10px;
    padding: 0;
}

.regist_main .agree-section:last-of-type {
    margin-bottom: 0;
}

/* 약관 동의 행 */
.regist_main .agree-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.regist_main .agree-section .agree-row:last-child {
    border-bottom: none;
}

.regist_main .agree-row-all {
    border-bottom: none;
}

.regist_main .agree-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.regist_main .agree-label input[type="checkbox"] {
    flex-shrink: 0;
}

.regist_main .label-text {
    flex: 1;
}

.regist_main .tag {
    flex-shrink: 0;
    font-size: 0.75rem;
    margin-right: 6px;
}

.regist_main .tag-required {
    color: #c00;
}

.regist_main .agree-section-required .label-text {
    color: #000;
}

.regist_main .tag-optional {
    color: #080;
}

.regist_main .btn-detail {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    font-size: 0.9rem;
    color: #999;
    cursor: pointer;
    margin-left: 4px;
    line-height: 1;
}

.regist_main .btn-detail:hover {
    color: #666;
}

/* 폼 섹션 (_common.css의 section padding 덮어씀) */
.regist_main .form-section {
    margin-bottom: 12px;
    padding: 0;
}

.regist_main .form-section:last-of-type {
    margin-bottom: 0;
}

.regist_main .form-section-title {
    margin: 0 0 8px 0;
    padding: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.regist_main .form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.regist_main .form-row .form-group {
    flex: 1;
    min-width: 0;
}

/* 폼 그룹 */
.regist_main .form-group {
    margin-bottom: 10px;
}

.regist_main .form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

/* 라벨 없이 인풋만 + 우측 상단 * */
.regist_main .form-group-inline {
    position: relative;
}

.regist_main .form-group-inline .input-required {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 12px;
    color: #c00;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}

.regist_main .form-group-inline .form-control {
    padding-right: 22px;
}

.regist_main .form-group-captcha-input .input-required,
.regist_main .captcha-input-wrap .input-required {
    top: 8px;
    right: 10px;
}

.regist_main .form-group-captcha-input .captcha-input,
.regist_main .captcha-input-wrap .captcha-input {
    padding-right: 20px;
}

.regist_main .required {
    color: #c00;
}

.regist_main .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.regist_main .form-control:focus {
    outline: none;
    border-color: #666;
}

.regist_main .form-group-checkbox {
    margin-bottom: 10px;
}

.regist_main .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.regist_main .checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
}

/* 캡챠 */
.regist_main .captcha-group label {
    margin-bottom: 4px;
}

.regist_main .captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.regist_main .captcha-image-box {
    width: 120px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    flex-shrink: 0;
}
.regist_main .captcha-image-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.regist_main .captcha-image-wrap .captcha-img {
    display: block;
    border-radius: 2px;
}
.regist_main .captcha-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.regist_main .captcha-input-wrap .captcha-input {
    flex: 0 0 auto;
}
.regist_main .captcha-refresh {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}
.regist_main .captcha-refresh:hover {
    background: #f5f5f5;
}

.regist_main .captcha-input {
    width: 120px;
    max-width: 120px;
}

.regist_main .captcha-hint {
    margin: 6px 0 0 0;
    font-size: 0.85rem;
    color: #666;
}

/* 버튼 */
.regist_main .panel-actions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.regist_main .btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    background: #f5f5f5;
}

.regist_main .btn:hover {
    background: #eee;
}

.regist_main .btn-next,
.regist_main .btn-submit {
    background: #333;
    color: #fff;
    border-color: #333;
}

.regist_main .btn-next:hover,
.regist_main .btn-submit:hover {
    background: #555;
}

.regist_main .btn-cancel {
    margin-right: 8px;
    color: #3366cc;
    border-color: #3366cc;
    background: #fff;
}

.regist_main .btn-cancel:hover {
    background: #f0f4ff;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-box {
    position: relative;
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-body .terms-content {
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-body .terms-content h3 {
    margin: 1em 0 0.5em 0;
    font-size: 1rem;
}

.modal-body .terms-content p {
    margin: 0.5em 0;
}
