@charset "UTF-8";

/* 1. Header Area - Force fix right button with absolute positioning */
header.main-header { 
    width: 100% !important; 
    max-width: 1100px !important; 
    margin: 0 auto !important; 
    padding: 15px 20px !important; 
    position: sticky !important; 
    top: 0 !important; 
    z-index: 1000 !important; 
    background: #fff !important; 
    border-bottom: 1px solid #eee !important; 
    display: block !important; 
    box-sizing: border-box !important; 
}
.main-header .logo { display: inline-block !important; margin: 0 !important; }
.main-header .logo svg, .main-header .logo img { height: 35px !important; width: auto !important; }

.main-header .header-nav { 
    position: absolute !important; 
    right: 20px !important; 
    top: 50% !important; 
    transform: translateY(-50%) !important; 
    display: flex !important; 
}
.btn-back { font-weight: 600; color: #555; font-size: 14px; display: flex; align-items: center; gap: 5px; }

/* Main Content Layout */
.detail-container { max-width: 800px; margin: 40px auto 100px; background: #fff; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); overflow: hidden; border: 1px solid #e0e0e0; }
.post-header { padding: 35px 40px; border-bottom: 1px solid #f0f0f0; }
.post-category { display: inline-block; font-size: 13px; font-weight: 800; color: #27ae60; background: #f0fdf4; padding: 5px 12px; border-radius: 6px; margin-bottom: 15px; }
.post-title { font-size: 24px; font-weight: 800; color: #222; margin: 0 0 15px 0; line-height: 1.4; word-break: keep-all; }
.post-meta { display: flex; align-items: center; gap: 15px; font-size: 14px; color: #888; }
.post-meta .views { display: flex; align-items: center; gap: 5px; }

/* Question (Q) */
.post-body { padding: 40px; }
.q-box { background: #f8f9fa; border-radius: 12px; padding: 30px; position: relative; margin-bottom: 50px; border: 1px solid #eaedf0; }
.q-icon { position: absolute; top: -15px; left: 30px; width: 34px; height: 34px; background: #333; color: #fff; font-size: 18px; font-weight: 900; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: Arial, sans-serif; }
.q-content { font-size: 16px; color: #444; line-height: 1.8; margin: 0; word-break: keep-all; }

/* Answer (A) Multi-structure Support */
.answers-wrapper { display: flex; flex-direction: column; gap: 60px; }
.a-box { position: relative; padding-bottom: 30px; border-bottom: 1px dashed #eee; }
.a-box:last-child { border-bottom: none; padding-bottom: 0; }
.a-icon { position: absolute; top: 0; left: 0; width: 34px; height: 34px; background: #27ae60; color: #fff; font-size: 18px; font-weight: 900; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: Arial, sans-serif; }

.expert-profile-bar { display: flex; align-items: center; gap: 15px; margin-left: 50px; margin-bottom: 20px; }
.expert-profile-bar img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 1px solid #eee; }
.expert-info .name { font-size: 16px; font-weight: 800; color: #222; }
.expert-info .office { font-size: 13px; color: #666; margin-top: 3px; }

.a-content { font-size: 16px; color: #333; line-height: 1.8; margin: 0 0 20px 50px; word-break: keep-all; }
.a-content p { margin: 0 0 15px 0; }
.a-content strong { color: #0f4c3a; background: linear-gradient(to top, rgba(39, 174, 96, 0.15) 40%, transparent 40%); }

/* Expert Individual Button Area */
.a-cta { margin-left: 50px; display: flex; gap: 10px; }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; font-size: 13px; font-weight: 700; border-radius: 6px; text-decoration: none; border: none; cursor: pointer; transition: 0.2s; }
.btn-sm.btn-060 { background: #fff; color: #d32f2f; border: 1px solid #d32f2f; }
.btn-sm.btn-060:hover { background: #fff5f5; }
.btn-sm.btn-hipass { background: #27ae60; color: #fff; border: 1px solid #27ae60; }
.btn-sm.btn-hipass:hover { background: #219653; }
.btn-sm.btn-profile { background: #f8f9fa; color: #555; border: 1px solid #e9ecef; }
.btn-sm.btn-profile:hover { background: #f1f3f5; color: #333; }

/* ==========================================================
   Payment & Modal Common CSS 
========================================================== */
.modal-overlay { 
    display: none; /* JS에서 flex로 변경 */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); z-index: 10000; align-items: center; justify-content: center; 
}
.modal-content-box { background: #fff; padding: 40px 30px; border-radius: 20px; width: 90%; max-width: 400px; position: relative; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); box-sizing: border-box; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 28px; cursor: pointer; color: #aaa; font-weight: 300; }

.modal-content-box h3.choice-title { font-size: 22px; color: #222; margin: 0 0 10px 0; font-weight: 800; }
.modal-content-box p.choice-desc { font-size: 15px; color: #666; margin: 0 0 30px 0; }
.btn-choice { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-bottom: 12px; border: none; font-family: inherit;}
.btn-choice.red { background: #fff; color: #d32f2f; border: 1px solid #d32f2f; }
.btn-choice.green { background: #27ae60; color: #fff; border: 1px solid #27ae60; }
.btn-choice.dark { background: #444; color: #fff; border: 1px solid #444; }
.btn-choice-cancel { display: inline-block; margin-top: 15px; font-size: 14px; color: #999; text-decoration: underline; cursor: pointer; }

.modal-content-box h3.input-title { font-size: 22px; color: #27ae60; margin: 0 0 10px 0; font-weight: 800; }
.modal-content-box p.input-desc { font-size: 15px; color: #666; margin: 0 0 25px 0; word-break: keep-all; }
.input-group { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.input-group input { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; text-align: center; box-sizing: border-box; outline: none; font-family: inherit;}
.input-group button { width: 100%; padding: 15px; background: #27ae60; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: inherit;}
.input-group button:hover { background: #219653; }
.modal-info { margin-top: 25px; text-align: left; background: #f9f9f9; padding: 15px; border-radius: 8px; }
.modal-info p { font-size: 12px; color: #888; margin: 4px 0; line-height: 1.4; }

/* Payment Modal Inner Details */
.prod-radio-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.prod-radio-wrap > div { flex: 1 1 calc(50% - 8px); }
.prod-radio-wrap input[type="radio"] { display: none; }
.prod-radio-label { display: flex; flex-direction: column; padding: 15px 10px; border: 1px solid #ddd; border-radius: 8px; text-align: center; cursor: pointer; transition: all 0.2s; background: #fff; }
.prod-radio-label .prod-name { font-size: 14px; color: #555; margin-bottom: 5px; }
.prod-radio-label .prod-price { font-size: 16px; font-weight: bold; color: #333; }
.prod-radio-wrap input[type="radio"]:checked + .prod-radio-label { border-color: #27ae60; background: #f0fdf4; }
.prod-radio-wrap input[type="radio"]:checked + .prod-radio-label .prod-name { color: #27ae60; font-weight: bold; }
.prod-radio-wrap input[type="radio"]:checked + .prod-radio-label .prod-price { color: #27ae60; }

.pay-layer { 
    display: none; 
    background: #fff; width: 90%; max-width: 400px; border-radius: 16px; 
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    z-index: 10001; flex-direction: column; overflow: hidden; 
    max-height: 85vh; /* ✨ 핵심: 창 높이의 85%까지만 커지도록 제한 */
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); 
}

.pay-layer.show { display: flex; }
.pay-layer-header { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; background: #fdfdfd; border-bottom: 1px solid #eee; height: 50px; flex-shrink: 0; }
.pay-layer-header h3 { display: flex; align-items: center; margin: 0; font-size: 18px; font-weight: 800; color: #333; }
.pay-layer-header h3 span:first-child { margin-right: 6px; transform: translateY(-2px); }
.btn-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #bbb; line-height: 1; }
.pay-layer-body { 
    padding: 20px; 
    overflow-y: auto; 
    flex: 1;          
    min-height: 0;    
    text-align: left; 
}

.section-title { font-size: 14px; font-weight: 700; margin: 15px 0 10px; color: #333; }

.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.btn-method { height: 48px; border: 1px solid #eee; background: #fff; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 100%; font-family: inherit;}
.btn-method.active { border: 2px solid #27ae60; font-weight: bold; }
.btn-method.naver-pay.active { background-color: #03C75A; border-color: #03C75A; color: #fff; }
.btn-method.kakao-pay span { color: #3C1E1E; margin-right:4px;}
.btn-method.kakao-pay.active { background-color: #3C1E1E; border-color: #3C1E1E; color: #fff; }
.btn-method.kakao-pay.active span { color: #FEE500; font-weight: 800; }

.btn-pay-execute { width: 100%; height: 54px; background: #27ae60; color: #fff; font-size: 18px; font-weight: bold; border-radius: 12px; border: none; margin-top: 10px; cursor: pointer; font-family: inherit;}
.user-info-section { background: #f0fdf4; padding: 15px; border-radius: 12px; margin-bottom: 20px; border: 1px inset #e0f2e5; }
.phone-tip { font-size: 12px; color: #888; line-height: 1.4; margin-bottom:10px; }
.input-phone { width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; font-weight: 700; color: #27ae60; box-sizing: border-box; outline: none; font-family: inherit;}
.non-member-warning { margin-top: 10px; padding: 10px 12px; background: #fff5f5; border-radius: 8px; font-size: 12px; color: #e74c3c; border: 1px solid #ffdada; line-height: 1.5; }

.membership-benefit-box { background: #fff9e6; border: 1px solid #f1c40f; border-radius: 12px; padding: 15px; margin-bottom: 20px; text-align: left; }
.benefit-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.benefit-header .badge { background: #e67e22; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 800; }
.benefit-header p { margin: 0; font-size: 14px; color: #333; font-weight: 600; }
.benefit-list { margin: 0 0 12px 0; padding-left: 0; }
.benefit-list li { font-size: 12px; color: #666; margin-bottom: 4px; list-style: none; position: relative; padding-left: 15px; }
.benefit-list li::before { content: '•'; position: absolute; left: 0; color: #f1c40f; }
.btn-join-sm { display: block; text-align: center; background: #333; color: #fff !important; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; text-decoration: none; }

.payment-success-box { text-align: center; padding: 20px; background: #f8fdfa; border-radius: 12px; border: 1px solid #d1e7dd; box-sizing: border-box; }
.pin-display { background: #fff; border: 2px dashed #27ae60; padding: 20px; border-radius: 10px; font-size: 24px; font-weight: 800; color: #27ae60; margin-bottom: 15px; letter-spacing: 2px;}
.success-buttons button, .success-buttons a { display: flex; align-items: center; justify-content: center; width: 100%; padding: 15px; border-radius: 12px; font-weight: 700; text-decoration: none; font-size: 16px; border: none; cursor: pointer; box-sizing: border-box; margin-top: 10px; font-family: inherit;}

.btn-sub-toggle { display: block; width: 100%; text-align: right; margin: 5px 0 15px 0; font-size: 12px; color: #999; background: none; border: none; cursor: pointer; }
.btn-cart-add { width: 100%; height: 50px; background: #fff; color: #555; border: 1px solid #ddd; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 10px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-family: inherit;}
.btn-close { cursor: pointer; background: none; border: none; font-size: 24px; color: #999; }

/* Payment Method Button Active States */

/* Naver Pay: Green background, White text */
.btn-method.naver-pay.active { background-color: #03C75A; border-color: #03C75A; color: #fff; }
.btn-method.naver-pay.active span { color: #fff !important; }

/* Kakao Pay: Dark brown background, Yellow text */
.btn-method.kakao-pay.active { background-color: #3C1E1E; border-color: #3C1E1E; color: #fff; }
.btn-method.kakao-pay.active span { color: #FEE500 !important; font-weight: 800; }

/* Toss Pay: Blue background, White text */
.btn-method.toss-pay.active { background-color: #3182f6; border-color: #3182f6; color: #fff; }
.btn-method.toss-pay.active span { color: #fff !important; }

/* Credit Card & Default: Dark grey background, White text */
.btn-method.credit-card.active,
.btn-method-sub.active { background-color: #333; border-color: #333; color: #fff; }

/* Success button colors (supplement payment.css) */
.btn-copy { background: #f1f1f1 !important; color: #666 !important; }
.btn-call-direct { background: #27ae60 !important; color: #fff !important; }
.btn-close-final { background: #fff !important; color: #888 !important; border: 1px solid #eee !important; }

/* Missing from payment.css */
.success-title { font-size: 18px; font-weight: 800; color: #2c3e50; margin-bottom: 20px; }
.success-guide { font-size: 13px; color: #666; margin-bottom: 25px; }
.success-buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 20px; }

#userPhone060 { 
    color: #27ae60 !important; 
    font-weight: 700 !important; 
}

#userPinNumber { 
    color: #27ae60 !important; 
    font-weight: 700 !important; 
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .detail-container { margin: 15px; border-radius: 10px; }
    .post-header { padding: 25px 20px; }
    .post-title { font-size: 20px; }
    .post-body { padding: 30px 20px; }
    .q-box { padding: 25px 20px; margin-bottom: 40px; }
    .q-icon { left: 20px; width: 28px; height: 28px; font-size: 15px; top: -14px; }
    .a-icon { width: 28px; height: 28px; font-size: 15px; }
    .expert-profile-bar { margin-left: 40px; }
    .a-content { margin-left: 0; margin-top: 20px; font-size: 15px; }
    .a-cta { margin-left: 0; flex-direction: column; width: 100%; }
}