/* =========================================
   TABLE RESERVATION MODAL - COMPACT & STYLED
========================================= */

/* Reservation Modal Overlay */
.reservation-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.reservation-modal-overlay.active {
    display: flex;
}

/* Compact Modal Container */
.reservation-modal {
    background: linear-gradient(135deg, #ffffff 0%, #faf9f6 100%);
    width: 100%;
    max-width: 550px;
    padding: 32px 36px;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
    position: relative;
    border: 2px solid rgba(197, 160, 89, 0.2);
    max-height: none;
    overflow: visible;
}

/* Close Button */
.reservation-modal .close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(197, 160, 89, 0.15);
    border: 2px solid var(--accent);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--accent);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.reservation-modal .close-modal:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* Modal Title */
.reservation-modal .modal-title {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

/* Modal Subtitle */
.reservation-modal .modal-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Compact Form */
.reservation-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reservation-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reservation-form .form-group {
    display: flex;
    flex-direction: column;
}

/* Compact Labels */
.reservation-form label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-bottom: 6px;
}

/* Compact Inputs */
.reservation-form .input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.reservation-form .input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

/* Compact Textarea */
.reservation-form textarea.input {
    resize: vertical;
    min-height: 60px;
    max-height: 90px;
}

/* Submit Button */
.reservation-form .btn.primary {
    padding: 12px 24px;
    font-size: 14px;
    margin-top: 8px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.reservation-form .btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.5);
}

/* =========================================
   RESERVATION SUCCESS MODAL
========================================= */

.reservation-success-modal {
    background: linear-gradient(135deg, #ffffff 0%, #faf9f6 100%);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease, successGlow 2s ease-in-out infinite;
    position: relative;
    border: 2px solid rgba(197, 160, 89, 0.3);
    text-align: center;
}

@keyframes successGlow {

    0%,
    100% {
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 0 0 30px rgba(197, 160, 89, 0.2);
    }

    50% {
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 0 0 50px rgba(197, 160, 89, 0.4);
    }
}

.success-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.4);
    animation: checkmarkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.success-title {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.success-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
}

.reservation-details {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    font-weight: 700;
}

.detail-value {
    font-size: 15px;
    color: var(--primary);
    font-weight: 600;
}

.success-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.success-message strong {
    color: var(--accent);
}

/* =========================================
   STAR RATING INPUT
========================================= */

.star-rating-input {
    display: flex;
    gap: 8px;
    font-size: 32px;
    cursor: pointer;
    justify-content: center;
    margin-top: 8px;
}

.star-rating-input .star {
    color: #ddd;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.star-rating-input .star.active {
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1.4);
    }
}

/* =========================================
   AVATAR SELECTOR
========================================= */

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

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

.avatar-option:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.3);
}

.avatar-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {

    .reservation-modal,
    .reservation-success-modal {
        padding: 28px 24px;
        max-width: 95%;
    }

    .reservation-form .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .reservation-modal .modal-title,
    .success-title {
        font-size: 24px;
    }

    .reservation-modal .modal-subtitle,
    .success-subtitle {
        font-size: 13px;
    }

    .avatar-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .success-checkmark {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}