/**
 * Campers in Flow - Shared Components Styles
 */

/* Dropdown Container */
.dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Dropdown visibility */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: var(--dark-lighter);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
}

/* Specific adjustment for Nav Links Dropdown (align left under menu item) */
.nav-links .dropdown-menu.nav-dropdown {
    right: auto;
    left: 0;
    width: 200px;
}

.dropdown-menu.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.dropdown-item.danger:hover {
    color: #ef4444;
}

/* User Menu Trigger */
.user-menu { height: 40px; align-items: center;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 30px;
    position: relative;
    transition: 0.3s;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

/* Markdown Toolbar */
.markdown-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    align-items: center;
}

.md-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--light);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    opacity: 0.7;
}

.md-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border);
    opacity: 1;
}

.md-btn .material-icons {
    font-size: 18px;
}

/* Notification Styles */
.notification-bell-container {
    display: flex;
    align-items: center;
    position: relative;
    color: var(--light);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark-lighter);
}

.dropdown-header {
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--light);
}

.notif-item {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: block;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
    background: rgba(16, 185, 129, 0.05);
}

.notif-item .notif-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-item .notif-body {
    font-size: 0.8rem;
    color: var(--light);
    opacity: 0.8;
}

.notif-item .notif-time {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 0.4rem;
}

/* Booking Widget */
.booking-widget {
    background: var(--dark-lighter);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.booking-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.booking-form-grid {
    display: grid;
    gap: 1rem;
}

.booking-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border: 1px dashed var(--primary);
}

.booking-field label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
}

.booking-field input,
.booking-field select {
    background: transparent;
    border: none;
    padding: 0.4rem 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
    width: 100%;
}

.booking-field input:focus,
.booking-field select:focus {
    outline: none;
}

/* Adjust date picker icon color if supported */
.booking-field input::-webkit-calendar-picker-indicator {
    filter: invert(56%) sepia(87%) saturate(385%) hue-rotate(113deg) brightness(95%) contrast(92%);
    cursor: pointer;
}

.booking-price-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border: 1px dashed var(--primary);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.price-total {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
}

.btn-booking {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--primary);
    color: var(--dark);
    font-weight: 800;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-booking:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    filter: brightness(1.1);
}

.btn-booking:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Booking Overlay */
#booking-overlay,
#claim-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#booking-overlay.active,
#claim-overlay.active {
    display: flex;
}

.booking-modal {
    background: var(--dark-lighter);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    animation: slideUpBooking 0.3s ease-out;
}

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

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

.booking-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.booking-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
}

@media (max-width: 768px) {
    #booking-overlay {
        padding: 0;
    }

    .booking-modal {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* --- Interactive Calendar --- */
.calendar-wrapper {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 1px solid transparent;
}

.calendar-day:hover:not(.other-month):not(.booked) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.calendar-day.other-month {
    opacity: 0.15;
    cursor: default;
}

.calendar-day.today {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 800;
}

.calendar-day.booked {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.available {
    background: rgba(16, 185, 129, 0.05);
}

.calendar-day.selected {
    background: var(--primary) !important;
    color: var(--dark) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.calendar-day.range {
    background: rgba(16, 185, 129, 0.3) !important;
    border-radius: 0;
}

.calendar-day.range-start {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.calendar-day.range-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.calendar-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--primary);
    color: var(--dark);
}

/* Reviews Section & Form */
.write-review-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.star-input {
    cursor: pointer;
    font-size: 2.2rem;
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.star-input:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.star-input.active {
    color: var(--primary);
}

#review-comment {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
}

#review-comment:focus {
    outline: none;
    border-color: var(--primary);
}

.login-prompt-banner {
    background: rgba(16, 185, 129, 0.05);
    border: 1px dashed var(--primary);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-prompt-banner p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--light);
}
/* Favorites Overlay */
.favorites-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.favorites-overlay.active {
    display: flex;
}

.favorites-modal {
    background: var(--dark-lighter);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    animation: slideUpBooking 0.3s ease-out;
}
