/* ==========================================================
   forms.css  --  Shared styles for form pages
   (login, sign_up, myPage, forgot_password, reset_password)
   ========================================================== */

/* ---- Containers ---- */

.login-container,
.signup-container,
.mypage-container,
.forgot-container,
.reset-container {
    margin: 0 auto;
    padding: 36px 20px 72px 20px;
    color: #f4f0ea;
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

.login-container,
.signup-container,
.mypage-container {
    max-width: 920px;
}

.forgot-container,
.reset-container {
    max-width: 500px;
}

/* ---- Glass-card sections ---- */

.login-section,
.signup-section,
.mypage-section,
.forgot-section,
.reset-section {
    margin-top: 22px;
    padding: 24px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.login-section {
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.signup-section,
.mypage-section {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Section headings ---- */

.login-section h2,
.signup-section h2,
.mypage-section h2,
.forgot-section h2,
.reset-section h2 {
    text-align: center;
    margin: 0 0 10px 0;
    color: #da8d52;
    font-size: clamp(1.25rem, 2.8vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0.05em;
}

/* ---- Kicker text ---- */

.login-kicker,
.signup-kicker,
.mypage-kicker,
.forgot-kicker,
.reset-kicker {
    margin: 0 0 12px 0;
    color: #cfa98b;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-align: center;
}

/* ---- Form groups (shared) ---- */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Login & signup label variant */
.login-section .form-group label,
.signup-section .form-group label {
    color: #ffe9cf;
    letter-spacing: 0.22em;
}

/* Forgot & reset label variant */
.forgot-section .form-group label,
.reset-section .form-group label {
    color: #cfa98b;
    letter-spacing: 0.18em;
}

/* ---- Login form inputs (dark background) ---- */

.login-section .form-group input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    color: #f4f0ea;
    transition: all 0.3s ease;
    font-family: inherit;
}

.login-section .form-group input::placeholder {
    color: rgba(244, 240, 234, 0.5);
}

.login-section .form-group input:focus {
    border-color: #da8d52;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(218, 141, 82, 0.15);
}

/* ---- Signup form inputs (white background) ---- */

.signup-section .form-group input,
.signup-section .form-group input.form-control {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #2b211a !important;
    transition: all 0.3s ease;
    font-family: inherit;
    -webkit-text-fill-color: #2b211a;
    caret-color: #2b211a;
}

.signup-section .form-group input::placeholder,
.signup-section .form-group input.form-control::placeholder {
    color: rgba(43, 33, 26, 0.45) !important;
    -webkit-text-fill-color: rgba(43, 33, 26, 0.45);
}

.signup-section .form-group input:focus,
.signup-section .form-group input.form-control:focus {
    border-color: #da8d52;
    outline: none;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(218, 141, 82, 0.15);
    color: #2b211a !important;
    -webkit-text-fill-color: #2b211a;
}

.signup-section .form-group input[readonly],
.signup-section .form-group input.form-control[readonly] {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #2b211a !important;
    -webkit-text-fill-color: #2b211a;
    cursor: default;
}

.signup-section .form-group input:-webkit-autofill,
.signup-section .form-group input.form-control:-webkit-autofill,
.signup-section .form-group input:-webkit-autofill:hover,
.signup-section .form-group input.form-control:-webkit-autofill:hover,
.signup-section .form-group input:-webkit-autofill:focus,
.signup-section .form-group input.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #2b211a !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    caret-color: #2b211a;
}

/* ---- Forgot / Reset form inputs (white background) ---- */

.forgot-section .form-group input,
.reset-section .form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    color: #2b211a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.forgot-section .form-group input::placeholder,
.reset-section .form-group input::placeholder {
    color: rgba(43, 33, 26, 0.45);
}

.forgot-section .form-group input:focus,
.reset-section .form-group input:focus {
    border-color: #da8d52;
    outline: none;
    box-shadow: 0 0 0 3px rgba(218, 141, 82, 0.15);
}

/* ---- Submit buttons ---- */

.login-btn,
.signup-btn,
.forgot-btn,
.reset-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(145deg, #da8d52, #b8723f);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s ease;
}

.login-btn {
    font-weight: 600;
}

.signup-btn {
    font-weight: 600;
    font-family: inherit;
}

.forgot-btn,
.reset-btn {
    font-weight: 700;
}

.login-btn:hover,
.signup-btn:hover,
.forgot-btn:hover,
.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(218, 141, 82, 0.2);
}

/* ---- Navigation links ---- */

.signup-link,
.login-link,
.back-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #f6e3d3;
}

.signup-link a,
.login-link a,
.back-link a {
    color: #da8d52;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover,
.login-link a:hover,
.back-link a:hover {
    color: #ffe9cf;
}

/* ---- Signup-specific: subtitle, hints, terms ---- */

.signup-subtitle {
    text-align: center;
    color: #f6e3d3;
    font-size: 14px;
    margin-bottom: 25px;
}

.required {
    color: #ffe9cf;
}

.form-hint,
.password-hint {
    font-size: 12px;
    color: #cfa98b;
    margin-top: 6px;
}

.terms-section {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.terms-content {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.6;
    color: #cfa98b;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #f6e3d3;
    font-size: 14px;
}

.terms-checkbox input {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer;
    accent-color: #da8d52;
    padding: 0 !important;
}

/* ---- MyPage-specific: info display ---- */

.info-section {
    margin-bottom: 18px;
    display: grid;
    gap: 8px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #ffe9cf;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.info-value {
    font-size: 14px;
    color: #f6e3d3;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 2px solid #da8d52;
    border-radius: 4px;
    word-break: break-all;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* ---- MyPage-specific: button group ---- */

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}

.btn-general {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.btn-home {
    background: linear-gradient(145deg, #da8d52, #b8723f);
    color: #1a1a1a;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(218, 141, 82, 0.2);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: #da8d52;
    border: 1px solid rgba(218, 141, 82, 0.3);
}

.btn-logout:hover {
    background: rgba(218, 141, 82, 0.1);
    border-color: #da8d52;
    transform: translateY(-2px);
}

.btn-edit {
    width: 100%;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #cfa98b;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f4f0ea;
    transform: translateY(-2px);
}

/* ---- MyPage-specific: edit forms ---- */

.edit-form {
    display: none;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-form.open {
    display: block;
}

.edit-form-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffe9cf;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.edit-group {
    margin-bottom: 14px;
}

.edit-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #cfa98b;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.edit-group input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #2b211a !important;
    -webkit-text-fill-color: #2b211a;
    caret-color: #2b211a;
    font-family: inherit;
    transition: all 0.3s ease;
}

.edit-group input::placeholder {
    color: rgba(43, 33, 26, 0.45) !important;
    -webkit-text-fill-color: rgba(43, 33, 26, 0.45);
}

.edit-group input:focus {
    border-color: #da8d52;
    outline: none;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(218, 141, 82, 0.15);
    color: #2b211a !important;
    -webkit-text-fill-color: #2b211a;
}

.edit-group input[readonly] {
    cursor: default;
    opacity: 0.7;
}

.edit-group input:-webkit-autofill,
.edit-group input:-webkit-autofill:hover,
.edit-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2b211a !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    caret-color: #2b211a;
}

.address-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.address-row input {
    width: 120px;
    flex-shrink: 0;
}

.btn-addr-search {
    padding: 10px 12px;
    background: rgba(218,141,82,0.15);
    color: #da8d52;
    border: 1px solid rgba(218,141,82,0.4);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.3s ease;
}

.btn-addr-search:hover {
    background: rgba(218,141,82,0.28);
}

.btn-save {
    width: 100%;
    padding: 11px 20px;
    background: linear-gradient(145deg, #da8d52, #b8723f);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(218, 141, 82, 0.25);
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
    .login-container,
    .signup-container,
    .mypage-container,
    .forgot-container,
    .reset-container {
        padding: 24px 14px 56px 14px;
    }

    .login-section,
    .signup-section,
    .mypage-section,
    .forgot-section,
    .reset-section {
        padding: 18px 14px;
    }

    .button-group {
        grid-template-columns: 1fr;
    }
}
