/* ============================================
   Page Common Styles
   공통 페이지 헤더, 컨테이너, 폼, 버튼 스타일
   ============================================ */

/* Page Header - 뒤로가기/타이틀/홈 버튼 헤더 */
.page-header {
    width: 100%;
    height: 64px;
    padding: 18px 22px;
    background-color: #F4FBFB;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-header .header-left {
    position: absolute;
    left: 22px;
    display: flex;
    align-items: center;
}

.page-header .header-back-btn {
    width: 18px;
    height: 24px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

.page-header .header-back-btn svg {
    width: 9.48px;
    height: 16.97px;
    fill: #000000;
}

.page-header .header-title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin: 0;
    padding: 4px;
}

.page-header .header-right {
    position: absolute;
    right: 22px;
    display: flex;
    align-items: center;
}

.page-header .header-home-btn {
    width: 24px;
    height: 23.5px;
    padding: 3px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.page-header .header-home-btn svg {
    width: 16px;
    height: 17.5px;
    fill: #000000;
}

/* Page Container */
.page-container {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    background: white;
}

/* Welcome Section */
.page-welcome {
    padding: 44px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.page-welcome .welcome-title {
    width: 342px;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    padding: 4px 0;
    text-align: left;
    line-height: 1.4;
}

.page-welcome .welcome-desc {
    width: 342px;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0;
    margin-top: -32px;
    text-align: left;
    line-height: 1.5;
}

/* Alert Messages */
.alert {
    margin: 0 20px 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #0a0;
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1976d2;
}

/* Section Label */
.section-label {
    padding: 30px 20px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

/* Form Styles */
.page-form {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-form .form-group {
    width: 350px;
    padding-top: 8px;
}

/* Form Section (섹션 래퍼) */
.page-form .form-section {
    width: 350px;
    margin-bottom: 20px;
}

.page-form .form-section .form-group {
    width: 100%;
}

.page-form .form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: black;
    margin-bottom: 16px;
}

.page-form .form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.page-form .form-section-header .form-section-title {
    margin-bottom: 0;
}

.page-form .form-section-summary {
    font-size: 14px;
    color: #808080;
}

.page-form .form-section-summary strong {
    color: #0299B0;
}

.page-form .form-label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin-bottom: 7px;
}

.page-form .form-input {
    width: 100%;
    height: 48px;
    padding: 4px 12px;
    border: 1px solid #808080;
    border-radius: 8px;
    font-size: 14px;
    color: #000000;
    background: white;
    box-sizing: border-box;
}

.page-form .form-input::placeholder {
    color: #808080;
    font-size: 14px;
    font-weight: 400;
}

.page-form .form-input:focus {
    outline: none;
    border-color: #0299b0;
}

.page-form .form-input:disabled {
    background: #F2F4F6;
    border-color: #808080;
    color: #808080;
}

/* Form Error Message */
.form-error-message {
    height: 17px;
    font-size: 14px;
    font-weight: 400;
    color: #E57373;
    margin-top: 7px;
}

/* Primary Button */
.btn-primary-full {
    width: 350px;
    height: 48px;
    margin: 20px 0;
    background: #0299B0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary-full:hover:not(:disabled) {
    background: #027a8f;
}

.btn-primary-full:disabled {
    background: #F2F4F6;
    color: #808080;
    border: 1px solid #808080;
    cursor: not-allowed;
}

/* Secondary Button */
.btn-secondary-full {
    width: 350px;
    height: 48px;
    margin: 10px 0;
    background: white;
    color: #0299B0;
    border: 1px solid #0299B0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary-full:hover:not(:disabled) {
    background: #F4FBFB;
}

.btn-secondary-full:disabled {
    background: #F2F4F6;
    color: #808080;
    border-color: #808080;
    cursor: not-allowed;
}

/* Text Button */
.btn-text-full {
    width: 350px;
    height: 48px;
    margin: 0;
    background: transparent;
    color: #666666;
    border: none;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: underline;
}

.btn-text-full:hover {
    color: #0299B0;
}

/* Check Button (인라인 버튼) */
.btn-check {
    min-width: 100px;
    height: 48px;
    padding: 4px 16px;
    background: #0299B0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-check:hover:not(:disabled) {
    background: #027a8f;
}

.btn-check:disabled {
    background: #808080;
    cursor: not-allowed;
}

/* Input with Button */
.input-with-button {
    display: flex;
    gap: 8px;
    width: 100%;
}

.input-with-button .form-input {
    flex: 1;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.social-btn {
    width: 350px;
    height: 48px;
    margin: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 4px;
}

.social-btn:hover {
    opacity: 0.9;
}

.social-btn-text {
    font-size: 18px;
    font-weight: 700;
}

/* Social Login Horizontal */
.social-login-horizontal {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.social-btn-horizontal {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 4px;
}

.social-btn-horizontal:hover {
    opacity: 0.9;
}

.kakao-btn {
    background: #FEE502;
    color: #000000;
}

.naver-btn {
    background: #04C75B;
    color: #FFFFFF;
}

/* Divider */
.divider {
    width: 100%;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E0E0E0;
}

.divider-text {
    color: #000000;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

/* Footer Links */
.page-footer {
    padding: 0 20px 20px;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
}

.page-footer .footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 1;
}

.page-footer .footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 2;
    margin-left: auto;
}

.page-footer-center {
    padding: 20px;
    text-align: center;
}

.footer-link-primary {
    font-size: 14px;
    font-weight: 700;
    color: #0299B0;
    text-decoration: none;
    line-height: 20px;
}

.footer-link-primary:hover {
    text-decoration: underline;
}

.footer-divider {
    font-size: 14px;
    color: #808080;
    margin: 0 4px;
}

.footer-text {
    font-size: 14px;
    color: #666666;
    margin: 0;
}

/* Responsive */
@media (max-width: 390px) {
    .page-container {
        padding: 0;
    }

    .social-btn {
        width: calc(100% - 40px);
    }

    .social-login-horizontal {
        width: 100%;
    }

    .btn-primary-full {
        width: 100%;
    }

    .page-form .form-group {
        width: 100%;
    }

    .page-form .form-section {
        width: 100%;
    }

    .page-welcome .welcome-title,
    .page-welcome .welcome-desc {
        width: 100%;
    }
}