/* assets/css/style.css - V3 - FINAL with Lightbox Fix */

/* --- Base & Typography --- */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --info-color: #1abc9c;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --body-bg: #f4f7f9;
    --text-color: #343a40;
    --shadow-md: 0 8px 25px rgba(0,0,0,0.1);
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    background-color: var(--body-bg);
    color: var(--text-color);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    transition: background-image 0.5s ease-in-out;
}

.container {
    width: 90%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* --- Background Effects Wrapper --- */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.page-wrapper.bg-full-blur::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* --- Header --- */
.main-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; min-height: 70px; }
.main-header .branding h1 { margin: 0; font-size: 24px; font-weight: 700; }
.main-header .branding h1 a { color: var(--secondary-color); text-decoration: none; }
#main-nav ul { padding: 0; margin: 0; list-style: none; display: flex; align-items: center; }
#main-nav li { margin-left: 20px; }
#main-nav a { color: #555; text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 5px; transition: all 0.2s ease; }
#main-nav a:hover { background-color: rgba(0,0,0,0.05); color: #000; }
#main-nav li.active a { background-color: var(--primary-color); color: #fff; }
.menu-toggle { display: none; background: transparent; border: none; font-size: 26px; cursor: pointer; }

/* --- Main Content --- */
.main-content {
    padding-top: 40px;
    padding-bottom: 40px;
    flex-grow: 1;
}

/* --- Auth Pages (Login, Register, Activate) & Partial Blur Effect --- */
.auth-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-grow: 1;
    padding: 20px;
    box-sizing: border-box;
}
.auth-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    border: 1px solid transparent;
    transition: background-color 0.3s, border-color 0.3s;
}
.page-wrapper.bg-partial-blur .auth-container,
.page-wrapper.bg-partial-blur .main-header,
.page-wrapper.bg-partial-blur .main-footer {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.4);
}
.page-wrapper.bg-partial-blur .main-content {
    background: transparent;
}
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h1 { color: var(--secondary-color); font-size: 24px; margin: 0 0 10px 0; font-weight: 600; }
.auth-header p { color: #7f8c8d; font-size: 16px; margin: 0; }
.auth-links { text-align: center; margin-top: 25px; font-size: 14px; }
.auth-links p { margin: 10px 0; color: #7f8c8d; }
.auth-links a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* --- General Components --- */
h1, h2, h3 { color: var(--secondary-color); }
h1 { font-size: 2.2em; margin-bottom: 0.7em; }
h2 { font-size: 1.8em; margin-bottom: 0.8em; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
h3 { font-size: 1.4em; margin-bottom: 0.6em; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #495057; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid #ced4da; border-radius: 5px; box-sizing: border-box; transition: border-color 0.2s ease, box-shadow 0.2s ease; font-size: 1em; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, .25); outline: none; }

.btn { display: inline-block; padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; text-decoration: none; font-size: 1em; font-weight: 600; transition: all 0.2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-secondary { background-color: #95a5a6; color: #fff; }
.btn-success { background-color: var(--success-color); color: #fff; }
.btn-danger { background-color: var(--danger-color); color: #fff; }
.btn-info { background-color: var(--info-color); color: #fff; }
.btn-sm { padding: 8px 15px; font-size: 0.85em; }
.btn-lg { padding: 14px 30px; font-size: 1.1em; }

.alert { padding: 15px 20px; margin-bottom: 20px; border-radius: 5px; border: 1px solid transparent; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.alert-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }

/* --- Tables --- */
.table-responsive {
    margin-top: 1.5rem;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}
.table thead th {
    background-color: var(--light-gray);
    color: #495057;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}
.table td, .table th {
    vertical-align: middle;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.03);
}
.table tbody tr:hover {
    background-color: #f1f3f5;
}

/* --- Component: Inline Form (for my_bookings.php) --- */
.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 260px;
}
.inline-form .form-control {
    flex-grow: 1;
    height: auto;
    padding: .35rem .75rem;
    font-size: .875rem;
    line-height: 1.5;
}

/* --- Component: Admin Notes Tooltip --- */
.admin-notes-tooltip {
    cursor: help;
    color: var(--info-color);
    border-bottom: 1px dotted var(--info-color);
}

/* --- Component: Actions Container --- */
.actions-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.actions-container form {
    margin: 0;
}

/* --- Badges --- */
.badge { display: inline-block; padding: .35em .65em; font-size: 80%; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 50rem; }
.badge-success { color: #fff; background-color: var(--success-color); }
.badge-info { color: #fff; background-color: var(--info-color); }
.badge-primary { color: #fff; background-color: var(--primary-color); }
.badge-secondary { color: #fff; background-color: #6c757d; }

/* --- Page Specific Styles --- */
/* index.php */
.hero { padding: 4rem 2rem; margin-bottom: 2.5rem; border-radius: .5rem; text-align: center; }
.hero:not(.frosted-card) { background-color: var(--medium-gray); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; margin-top: 30px; }
.event-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.06); display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease; overflow: hidden; }
.event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.event-card-image { width: 100%; height: 200px; object-fit: cover; display: block; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.event-card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.event-card-content h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.25em; }
.event-card-content .date { font-size: 0.9em; color: #7f8c8d; margin-bottom: 15px; font-weight: 500; }
.event-card-content .description { font-size: 0.95em; color: #555; line-height: 1.5; margin-bottom: 15px; flex-grow: 1; }
.event-card-footer { padding: 20px; padding-top: 0; }
.locked-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.8); color: var(--secondary-color); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; transition: opacity 0.3s ease; border-radius: 8px; }
.event-card a:hover .locked-overlay { opacity: 1; }
.locked-overlay i { font-size: 2em; margin-bottom: 10px; }

/* view_event.php */
.event-header { text-align: center; margin-bottom: 2rem; }
.event-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-bottom: 2rem; }
.event-gallery .gallery-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.2s ease; }
.event-gallery .gallery-item img:hover { transform: scale(1.05); }
.event-description { background: #fdfdfd; padding: 25px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 2rem; line-height: 1.7; }
.event-description img { max-width: 100%; height: auto; border-radius: 5px; }
.status-available { background-color: var(--success-color); }
.status-full { background-color: var(--danger-color); }
.status-limited { background-color: var(--warning-color); }
.frosted-card {
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    transform: translateZ(0);
    will-change: transform;
}
.event-header.frosted-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.table-responsive.frosted-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* --- Component: Lightbox --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2.5vw;
    box-sizing: border-box;
}
.lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    position: relative;
    max-width: 1200px; /* Max width on large screens */
    width: 95vw;
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.lightbox-close {
    position: fixed; /* KEY FIX: Position relative to viewport */
    top: 20px;
    right: 30px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    line-height: 1;
    z-index: 2001; /* Above the overlay */
}
.lightbox-close:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.8);
}

/* --- Footer --- */
.main-footer { text-align: center; padding: 25px 0; color: #adb5bd; background: var(--secondary-color); flex-shrink: 0; }
.main-footer a { color: var(--primary-color); text-decoration: none; }

/* --- Responsive --- */
@media(max-width: 768px) {
    .menu-toggle { display: block; }
    #main-nav { position: absolute; top: 100%; left: 0; right: 0; background-color: #fff; width: 100%; max-height: 0; overflow: hidden; transition: max-height 0.35s ease-out; box-shadow: 0 5px 10px rgba(0,0,0,0.1); border-top: 1px solid var(--border-color); }
    #main-nav.active { max-height: 500px; }
    #main-nav ul { flex-direction: column; width: 100%; padding: 10px 0; }
    #main-nav li { margin-left: 0; width: 100%; }
    #main-nav li a { display: block; padding: 12px 20px; border-radius: 0; border-bottom: 1px solid #f0f2f5; }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    /* --- RESPONSIVE STYLES FOR MY_BOOKINGS.PHP TABLE --- */
    .table-responsive[data-page="my-bookings"] .table thead { display: none; }
    .table-responsive[data-page="my-bookings"] .table tr {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 1.5rem;
        display: block;
        background-color: #fff;
    }
    .table-responsive[data-page="my-bookings"] .table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border: none;
        border-bottom: 1px solid #f0f2f5;
        padding: 15px;
        text-align: right;
        flex-wrap: wrap;
    }
    .table-responsive[data-page="my-bookings"] .table td:before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        padding-right: 10px;
        color: var(--secondary-color);
        flex-basis: 100%;
        margin-bottom: 5px;
    }
    .table-responsive[data-page="my-bookings"] .table td:last-child { border-bottom: 0; }
    .table-responsive[data-page="my-bookings"] .inline-form {
        width: 100%;
        margin-top: 8px;
    }
    .table-responsive[data-page="my-bookings"] .actions-container {
        width: 100%;
        margin-top: 8px;
        justify-content: flex-end;
    }
}
/* --- Component: Admin Notes Modal (New) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    box-sizing: border-box;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}
/* --- Component: Edit User Note Modal (扩展自基础Modal) --- */
/* 复用基础modal-overlay样式，仅扩展差异部分 */
#edit-user-note-modal .modal-content {
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

#edit-user-note-modal .modal-header {
    padding: 16px 0;
    margin-bottom: 1.25rem;
    border-bottom-color: var(--border-color);
}

#edit-user-note-modal .modal-header h4 {
    margin: 0;
    font-size: 1.25em;
    color: var(--secondary-color);
    font-weight: 600;
}

#edit-user-note-modal .modal-body {
    padding: 0;
}

#edit-user-note-modal .form-group {
    margin-bottom: 1.5rem;
}

#edit-user-note-modal .form-group label {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

#edit-user-note-modal .form-control {
    border-radius: 5px;
    padding: 10px 12px;
    border-color: var(--border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#edit-user-note-modal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

#edit-user-note-modal .form-text {
    color: #6c757d;
    font-size: 0.875em;
}

/* 弹窗操作区样式 */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.modal-actions .btn {
    padding: 8px 18px;
    font-size: 0.9em;
    border-radius: 5px;
}

.modal-actions .btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.modal-actions .btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

/* 编辑备注按钮样式优化 */
.edit-note-btn {
    color: var(--primary-color);
    padding: 0 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.edit-note-btn:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
    text-decoration: none;
}

/* 成功提示组件 */
.note-success-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    z-index: 4000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.note-success-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- 响应式适配：编辑备注弹窗 --- */
@media(max-width: 768px) {
    #edit-user-note-modal .modal-content {
        width: 95%;
        padding: 20px;
        max-width: 95%;
    }

    #edit-user-note-modal .modal-header {
        padding-bottom: 12px;
        margin-bottom: 1rem;
    }

    #edit-user-note-modal .modal-header h4 {
        font-size: 1.1em;
    }

    #edit-user-note-modal .form-control {
        padding: 8px 10px;
    }

    .modal-actions {
        gap: 0.5rem;
    }

    .modal-actions .btn {
        padding: 6px 14px;
        font-size: 0.85em;
    }

    /* 移动端提示位置调整 */
    .note-success-toast {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.875em;
    }
}
/* --- 编辑备注弹窗：优化版（无滚动条+固定定位） --- */
/* 弹窗遮罩层：固定全屏覆盖 */
#edit-user-note-modal {
    position: fixed !important; /* 强制固定定位，不受父元素影响 */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 3000 !important; /* 确保在最上层 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important; /* 禁止遮罩层滚动 */
}

/* 弹窗内容区：固定尺寸+居中 */
#edit-user-note-modal .modal-content {
    width: 90% !important;
    max-width: 500px !important;
    max-height: 80vh !important; /* 限制最大高度，避免超出屏幕 */
    height: auto !important;
    padding: 22px !important;
    margin: 0 !important; /* 清除默认margin，确保居中 */
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    transform: none !important; /* 取消不必要的位移动画 */
    overflow: hidden !important; /* 禁止内容溢出产生滚动条 */
}

/* 弹窗头部：精简间距 */
#edit-user-note-modal .modal-header {
    padding: 0 0 12px 0 !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid #f0f2f5 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#edit-user-note-modal .modal-header h4 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #343a40 !important;
    margin: 0 !important;
}

/* 关闭按钮：优化样式 */
#edit-user-note-modal .modal-close {
    font-size: 22px !important;
    color: #868e96 !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
}

#edit-user-note-modal .modal-close:hover {
    color: #000 !important;
}

/* 弹窗主体：固定高度，无滚动 */
#edit-user-note-modal .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important; /* 取消最大高度限制，避免滚动 */
    overflow: hidden !important; /* 禁止主体滚动 */
}

/* 表单组：精简间距 */
#edit-user-note-modal .form-group {
    margin-bottom: 18px !important;
}

#edit-user-note-modal .form-group label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #495057 !important;
    margin-bottom: 6px !important;
    display: block !important;
}

/* 文本域：固定高度，无滚动 */
#edit-user-note-modal .form-control {
    width: 100% !important;
    height: 120px !important; /* 固定高度，避免内容过多产生滚动 */
    min-height: 120px !important;
    max-height: 120px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    resize: none !important; /* 禁止用户拉伸文本域 */
    overflow: hidden !important; /* 彻底禁止滚动条 */
    box-sizing: border-box !important;
}

#edit-user-note-modal .form-control:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2) !important;
    outline: none !important;
}

/* 辅助文本：精简样式 */
#edit-user-note-modal .form-text {
    font-size: 12px !important;
    color: #6c757d !important;
    margin-top: 4px !important;
    display: block !important;
}

/* 操作按钮区：固定位置，精简样式 */
#edit-user-note-modal .modal-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-top: 0 !important;
    padding-top: 4px !important;
}

#edit-user-note-modal .btn {
    padding: 7px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

#edit-user-note-modal .btn-secondary {
    background-color: #e9ecef !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
}

#edit-user-note-modal .btn-secondary:hover {
    background-color: #dee2e6 !important;
    color: #212529 !important;
    transform: none !important; /* 取消 hover 位移，避免界面晃动 */
}

#edit-user-note-modal .btn-primary {
    background-color: #3498db !important;
    color: #fff !important;
    border: 1px solid #3498db !important;
}

#edit-user-note-modal .btn-primary:hover {
    background-color: #2980b9 !important;
    transform: none !important; /* 取消 hover 位移 */
}

/* 响应式适配：移动端保持无滚动 */
@media (max-width: 768px) {
    #edit-user-note-modal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 18px !important;
    }

    #edit-user-note-modal .form-control {
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
    }

    #edit-user-note-modal .btn {
        padding: 6px 14px !important;
        font-size: 13px !important;
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: var(--secondary-color);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0;
}
.modal-close:hover {
    color: #000;
}

.modal-body {
    line-height: 1.7;
    /*white-space: pre-wrap; */
    word-wrap: break-word;
    max-height: 60vh;
    overflow-y: auto;
}
/* --- Page Specific Styles: view_event.php Spacing Fix --- */

/* 为页面中的主要内容块之间增加统一的下外边距 */
#view-event-page .event-gallery,
#view-event-page .event-description {
    margin-bottom: 2.5rem; /* 约 40px 的间距 */
}

/* 增加“选择预约时段”标题的上外边距，将其与上方内容隔开 */
#view-event-page h2:last-of-type {
    margin-top: 2.5rem; /* 约 40px 的间距 */
}

/* 增加表格容器的上外边距，让它和标题之间有呼吸感 */
#view-event-page .table-responsive {
    margin-top: 1rem; /* 约 16px 的间距 */
}
/* --- Page Specific Styles: view_event.php Spacing Fix --- */

/* 为活动图集、活动详情这两个内容块增加下外边距，让它们和下方内容分开 */
.event-gallery,
.event-description {
    margin-bottom: 2.5rem; /* 约 40px 的间距 */
}

/* 为紧跟在 .event-description 后面的 h2 (即“选择预约时段”标题) 
  增加上外边距，将其与详情描述分开 
*/
.event-description + h2 {
    margin-top: 2.5rem;
}

/* 稍微增加表格上方的间距，让标题和表格之间有呼吸感 */
.event-description + h2 + .table-responsive {
    margin-top: 1rem;
}
/* --- 方案一：优雅渐变下划线 --- */
.main-content h2 {
  text-align: center; /* 标题居中 */
  font-weight: 600;   /* 字体稍粗 */
  margin-top: 2.5rem; /* 与上方元素的间距 */
  margin-bottom: 1.5rem; /* 与下方元素的间距 */
  position: relative;
  padding-bottom: 15px; /* 为下划线留出空间 */
  color: #343a40; /* 标题颜色，可根据您的主题调整 */
}

/* 修复优惠码下拉框与按钮的对齐问题 */
#coupon-select-container .input-group {
  align-items: center; /* 确保内部元素垂直居中 */
}

/* 下拉框样式：保持与原输入框一致的高度 */
#coupon-selector.custom-select {
  height: calc(1.5em + .75rem + 2px) !important; /* 恢复Bootstrap默认高度公式 */
  line-height: 1.5 !important;
  padding: .375rem 1.75rem .375rem .75rem !important; /* 保持默认内边距 */
}

/* 同步按钮样式：与下拉框高度一致 */
#apply-coupon-btn {
  height: calc(1.5em + .75rem + 2px) !important; /* 与下拉框高度完全匹配 */
  padding: .375rem .75rem !important; /* 按钮默认内边距 */
  margin-left: -1px !important; /* 消除按钮与下拉框之间的缝隙（Bootstrap默认样式） */
}

/* 修复原"查看可用"按钮的样式（防止意外错乱） */
#fetch-coupons-btn {
  height: calc(1.5em + .75rem + 2px) !important;
}
