/* =========================================
   선생님 캘린더 - 투어 상세 모달 (v5.5)
   + 모바일 메모 입력창 "참여자 정보"와 동일 높이로 초슬림화
   ========================================= */

/* ========== 공통 변수 (색상 팔레트) ========== */
:root {
    --bg-soft: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --primary-soft: #eff6ff;
    --primary-main: #3b82f6;
    --primary-dark: #1d4ed8;
    --danger-soft: #fef2f2;
    --danger-text: #ef4444;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

/* ========== 기본 스타일 (PC/데스크톱) ========== */

/* 투어 상세 모달 컨테이너 */
.tour-detail-container {
    padding: 24px;
    background-color: var(--bg-soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 섹션 타이틀 */
.tour-section-title, .off-section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

/* 리스트 컨테이너 */
.tour-list-container, .off-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

/* 투어 카드 */
.tour-card {
    padding: 24px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border-left: 5px solid var(--primary-main);
    transition: all 0.3s ease;
}

.tour-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 투어 헤더 */
.tour-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

/* 통계 인라인 */
.tour-stats-inline {
    padding: 12px 16px;
    background: var(--primary-soft);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-sub);
    font-weight: 500;
    text-align: center;
}

.tour-stats-inline .stat-value-blue { color: var(--primary-main); font-weight: 700; }
.tour-stats-inline .stat-value-darkblue { color: var(--primary-dark); font-weight: 800; }

/* 확정 완료 배지 */
.tour-status-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.tour-confirmed-badge {
    padding: 6px 12px;
    background: #dcfce7;
    color: #166534;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* OFF 카드 */
.off-card {
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    border-left: 4px solid var(--danger-text);
    box-shadow: var(--shadow-card);
}

.off-type { font-size: 16px; font-weight: 700; color: var(--danger-text); margin-bottom: 4px; }
.off-reason { font-size: 14px; color: var(--text-sub); }

/* ============================================
   고객 카드 - 디자인 중심 개선
   ============================================ */

.customer-list-section { margin-top: 24px; }

.customer-list-title {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

/* 고객 카드 */
.customer-card {
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.customer-card:hover {
    border-color: var(--primary-main);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.customer-field-label { display: none; }

/* 테이블 행 레이아웃 */
.customer-table-row {
    display: grid;
    grid-template-columns: 1.2fr 2fr auto;
    gap: 16px;
    align-items: center;
    min-height: 36px;
}

/* 고객명 */
.customer-name-cell { display: flex; align-items: center; }
.customer-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}
.customer-number { color: var(--primary-main); font-size: 14px; }

/* 연락처 & 복사 버튼 */
.customer-contact-cell { display: flex; align-items: center; }
.phone-with-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.customer-phone {
    font-size: 15px;
    color: var(--text-sub);
    font-family: 'Roboto Mono', monospace;
    letter-spacing: -0.5px;
}

/* PC 복사 버튼 */
.copy-btn {
    height: 24px;
    padding: 0 8px;
    background: var(--primary-main);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.copy-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.copy-btn:active { transform: translateY(0); }

/* 인원 */
.customer-count-cell { display: flex; align-items: center; justify-content: flex-end; }
.customer-count-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

/* 참여자 정보 */
.participant-info-inline {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-sub);
    border-left: 3px solid #cbd5e1;
}

/* ⭐ 선생님 메모 입력란 (PC 기본) */
.teacher-memo-area {
    margin-top: 12px;
    background: #fffff0;
    border: 1px solid #fef08a;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.memo-label {
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.memo-input {
    width: 100%;
    height: 32px; /* PC는 32px */
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.memo-input::placeholder {
    color: #9ca3af;
}

.memo-input:focus {
    border-bottom-color: #f59e0b;
}

/* 결제액 */
.customer-amount-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}
.customer-amount-box {
    padding: 6px 10px;
    background: #fffbeb;
    border-radius: 6px;
    color: #b45309;
    font-weight: 700;
    font-size: 14px;
}

/* ========== 모바일 반응형 (768px 이하) ========== */
@media (max-width: 768px) {
    .tour-detail-container { padding: 16px; background: #f1f5f9; }
    
    .tour-card { padding: 20px; border-radius: 16px; border-left-width: 4px; }
    
    .tour-header { font-size: 16px; margin-bottom: 12px; }
    .tour-stats-inline { padding: 10px; font-size: 13px; margin-bottom: 16px; }
    
    .customer-card {
        padding: 14px;
        margin-bottom: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.03);
        border: none;
    }
    
    .customer-table-row {
        gap: 8px;
        min-height: 28px;
    }

    .customer-name { font-size: 14px; }
    .customer-number { font-size: 12px; }

    .customer-phone {
        font-size: 13px;
        letter-spacing: -0.3px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 모바일 복사 버튼 강제 다이어트 */
    .copy-btn {
        -webkit-appearance: none;
        appearance: none;
        height: 18px !important;
        line-height: 18px !important;
        min-height: 0 !important;
        max-height: 18px !important;
        padding: 0 6px !important;
        font-size: 10px !important;
        font-weight: 500 !important;
        border-radius: 4px !important;
        margin-left: 6px !important;
        background: var(--primary-main);
        box-shadow: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        transform: translateY(0);
    }

    .customer-count-value { font-size: 14px; }

    /* 참여자 정보 (기준점) */
    .participant-info-inline {
        margin-top: 8px;
        padding: 8px 10px; /* 기준 높이 */
        font-size: 12px;
        line-height: 1.4;
    }

    /* ⭐ 메모 입력창 모바일 초슬림화 (참여자 정보와 완전 동일하게) ⭐ */
    .teacher-memo-area {
        margin-top: 8px;
        padding: 4px 10px; /* 패딩을 4px로 더 줄임 */
        border-radius: 6px;
        gap: 8px;
        min-height: 0; /* 최소 높이 해제 */
        height: auto;
    }

    .memo-label {
        font-size: 11px;
        line-height: 1;
    }

    .memo-input {
        height: 18px; /* 높이 20px -> 18px로 더 축소 */
        font-size: 12px;
        line-height: 18px;
        padding: 0; /* 내부 패딩 제거 */
        margin: 0;
        border: none !important; /* 테두리 강제 제거 */
        background: transparent !important; /* 배경 투명 */
    }
    
    .customer-amount-row { margin-top: 10px; padding-top: 10px; }
}

/* ========== 작은 모바일 (375px 이하) ========== */
@media (max-width: 375px) {
    .tour-detail-container { padding: 12px; }
    .customer-card { padding: 12px; }
    .customer-table-row { gap: 4px; }
    .customer-phone { font-size: 12px; }
}