/**
 * BoxBMS Customer Booking Site - CSS Styles
 * 
 * ⚠️ ULTRA-MINIMAL COLOR SYSTEM
 * 
 * Để thay đổi màu giao diện:
 * 1. Mở file public/booking/config.php
 * 2. Chỉnh sửa PRIMARY_COLOR và SECONDARY_COLOR
 * 3. XONG! Không cần động đến CSS này nữa
 * 
 * Hệ thống màu cực kỳ đơn giản:
 * - Chỉ 2 màu theme (primary, secondary) + 1 RGB variant
 * - Backgrounds, borders, shadows dùng rgba() với opacity
 * - Không có tên màu "pink", "yellow" - hoàn toàn neutral
 * - Works với BẤT KỲ màu nào: xanh, đỏ, vàng, tím, cam, etc.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0.12) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Index Page Styles */
.icon-circle {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.25);
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: white;
    color: var(--primary-color);
    transform: translateX(-5px);
}

/* Rating Container */
.rating-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
}

.rating-header {
    background: white;
    padding: 30px 25px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.rating-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.rating-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.header-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(var(--primary-rgb), 0.06);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.header-info-row {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Rating Body */
.rating-body {
    background: white;
    padding: 25px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: -1px;
}

/* Customer Info */
.customer-info {
    margin-bottom: 30px;
}

.customer-info h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.15);
}

.staff-header-left {
    font-weight: 600;
}

.staff-datetime {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.staff-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), white);
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
}

.staff-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
    transform: translateX(5px);
}

.staff-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 3px;
}

.staff-position {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Staff Item - Display only (no selection) */
.staff-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), white);
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
}

/* Branch Selection */
.branch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.branch-item .btn {
    text-align: left;
    padding: 15px;
    border-width: 2px;
    transition: all 0.3s ease;
}

.branch-item .btn:hover {
    transform: translateX(5px);
}

.btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-check:checked + .btn .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}


/* Rating Section */
.rating-section {
    text-align: center;
    margin-bottom: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #fafafa, #fcfcfc);
    border-radius: 15px;
}

.rating-section h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.star {
    font-size: 3rem;
    color: #e8e8e8;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: var(--warning);
    transform: scale(1.2);
}

.star.active {
    animation: starPulse 0.5s ease;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.4);
    }
}

.rating-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    min-height: 30px;
}

/* Form Controls */
.form-label {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.15);
}

/* Quick Notes Section */
.quick-notes-section {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), white);
    border-radius: 15px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.quick-notes-title {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.quick-notes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-note-tag {
    padding: 5px 10px;
    background: white;
    border: 1.5px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 15px;
    font-size: 0.75rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.quick-note-tag:hover {
    border-color: var(--primary-color);
    background: #fafafa;
}

.quick-note-tag.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeInUp 0.5s ease-out;
}

.feedback-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 3.5rem;
    animation: iconBounce 0.6s ease-out;
}

.feedback-icon.happy {
    background: linear-gradient(135deg, var(--success), #20bf6b);
    color: white;
}

.feedback-icon.sad {
    background: var(--primary-color);
    color: white;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.success-message h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.success-message p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Hotline Box */
.hotline-box {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.02), white);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
}

.hotline-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.hotline-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 8px;
}

.hotline-number:hover {
    color: var(--secondary-color);
}

.hotline-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 576px) {
    .rating-header h1 {
        font-size: 1.5rem;
    }
    
    .star {
        font-size: 2.5rem;
    }
    
    .hotline-number {
        font-size: 1.5rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 1.2rem;
    height: 1.2rem;
    border-width: 2px;
}

/* ==================== BOOKING-SPECIFIC STYLES ==================== */

/* Service Group List */
.service-group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-group-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), white);
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-group-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
    transform: translateX(5px);
}

.service-group-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.service-group-item.selected {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: var(--primary-color);
    font-weight: 600;
}

.service-group-item label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
}

/* Branch List */
.branch-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* Desktop: 2 columns */
@media (min-width: 768px) {
    .branch-list {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

.branch-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), white);
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.branch-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
    transform: translateY(-2px);
}

.branch-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.branch-item.selected {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: var(--primary-color);
}

.branch-info {
    flex: 1;
    cursor: pointer;
}

.branch-info label {
    cursor: pointer;
    margin: 0;
}

.branch-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.branch-address {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Date Selector */
.date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(var(--primary-rgb), 0.06);
    border-radius: 15px;
    border: 2px solid rgba(var(--primary-rgb), 0.2);
}

.date-nav-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary-color);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.date-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.date-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 200px;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

/* Time Slots Grid */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #fafafa, #fcfcfc);
    border-radius: 15px;
    border: 2px solid rgba(var(--primary-rgb), 0.2);
}

.time-slot {
    padding: 12px 8px;
    background: white;
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: #fafafa;
    transform: translateY(-2px);
}

.time-slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .date-display {
        font-size: 1.4rem;
        min-width: 160px;
    }
    
    .date-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .time-slot {
        padding: 10px 6px;
        font-size: 0.85rem;
    }
}

/* Loading state */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 15px;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}
