/**
 * Home Booking Calendar Styles
 *
 * Eye-catching calendar section for the homepage
 *
 * @package DoItAllDemo
 * @since 1.0.0
 */

/* ==========================================================================
   Section Base
   ========================================================================== */

.home-booking {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.home-booking::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D97706, #F59E0B, #D97706);
}

.home-booking .section__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

/* ==========================================================================
   Calendar Container
   ========================================================================== */

.home-booking__calendar {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 20px 40px -10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Week Header */
.home-booking__week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1B365D 0%, #2d4a7c 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 1rem;
}

.home-booking__week-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.home-booking__week-label svg {
    opacity: 0.8;
}

.home-booking__legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.home-booking__legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.home-booking__legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.home-booking__legend-item--available .home-booking__legend-dot {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.home-booking__legend-item--limited .home-booking__legend-dot {
    background: #F59E0B;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.home-booking__legend-item--booked .home-booking__legend-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* ==========================================================================
   Days Grid
   ========================================================================== */

.home-booking__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
}

.home-booking__day {
    background: #ffffff;
    padding: 1.25rem;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.home-booking__day:hover {
    background: #f8fafc;
}

.home-booking__day--today {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.05) 0%, rgba(217, 119, 6, 0.1) 100%);
    box-shadow: inset 0 0 0 2px #D97706;
}

.home-booking__day--past {
    background: #f1f5f9;
    opacity: 0.7;
}

/* Day Header */
.home-booking__day-header {
    margin-bottom: 1rem;
}

.home-booking__day-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.home-booking__day-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1B365D;
}

.home-booking__day--today .home-booking__day-number {
    color: #D97706;
}

.home-booking__day-badge {
    display: inline-block;
    background: #D97706;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Day Slots */
.home-booking__day-slots {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.home-booking__slot-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.home-booking__slot-status--available {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.home-booking__slot-status--limited {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
    animation: pulse-limited 2s ease-in-out infinite;
}

@keyframes pulse-limited {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.home-booking__slot-status--booked {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.home-booking__slot-status--past {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Book Button */
.home-booking__book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.home-booking__book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.home-booking__book-btn:active {
    transform: translateY(0);
}

/* Booked Indicator */
.home-booking__booked-indicator {
    margin-top: auto;
    padding-top: 0.5rem;
}

.home-booking__booked-count {
    font-size: 0.6875rem;
    color: #64748b;
    font-style: italic;
}

/* ==========================================================================
   Quick Stats
   ========================================================================== */

.home-booking__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

.home-booking__stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    transition: all 0.3s ease;
}

.home-booking__stat:hover {
    background: #f8fafc;
}

.home-booking__stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-booking__stat-icon--projects {
    background: linear-gradient(135deg, #1B365D 0%, #2d4a7c 100%);
    color: #fff;
}

.home-booking__stat-icon--response {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #fff;
}

.home-booking__stat-icon--rating {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    color: #fff;
}

.home-booking__stat-icon--insured {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
}

.home-booking__stat-content {
    text-align: left;
}

.home-booking__stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1B365D;
    line-height: 1.2;
}

.home-booking__stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.home-booking__cta {
    text-align: center;
}

.home-booking__cta-text {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.home-booking__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.home-booking__cta-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Booking Modal
   ========================================================================== */

.home-booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.home-booking-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.home-booking-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.home-booking-modal__content {
    position: relative;
    background: #ffffff;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.home-booking-modal[aria-hidden="false"] .home-booking-modal__content {
    transform: scale(1) translateY(0);
}

.home-booking-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.home-booking-modal__close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.home-booking-modal__close svg {
    color: #64748b;
}

.home-booking-modal__header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 1.5rem 1.5rem 0 0;
}

.home-booking-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1B365D;
    margin-bottom: 0.5rem;
}

.home-booking-modal__date {
    font-size: 1.125rem;
    color: #D97706;
    font-weight: 600;
}

.home-booking-modal__form {
    padding: 1.5rem 2rem 2rem;
}

.home-booking-modal__field {
    margin-bottom: 1.25rem;
}

.home-booking-modal__field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.home-booking-modal__field input,
.home-booking-modal__field select,
.home-booking-modal__field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.home-booking-modal__field input:focus,
.home-booking-modal__field select:focus,
.home-booking-modal__field textarea:focus {
    border-color: #D97706;
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.home-booking-modal__submit {
    width: 100%;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .home-booking__stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-booking__week-header {
        flex-direction: column;
        text-align: center;
    }

    .home-booking__days {
        grid-template-columns: repeat(4, 1fr);
        gap: 1px;
    }

    .home-booking__day {
        padding: 0.75rem 0.5rem;
        min-height: 120px;
    }

    .home-booking__day-number {
        font-size: 1.125rem;
    }

    .home-booking__slot-status {
        font-size: 0.625rem;
        padding: 0.35rem 0.5rem;
    }

    .home-booking__slot-status svg {
        display: none;
    }

    .home-booking__book-btn {
        font-size: 0.6875rem;
        padding: 0.35rem 0.5rem;
    }

    .home-booking__booked-count {
        display: none;
    }

    .home-booking__stat {
        padding: 1rem;
    }

    .home-booking__stat-icon {
        width: 40px;
        height: 40px;
    }

    .home-booking__stat-number {
        font-size: 1.25rem;
    }
}

@media (max-width: 600px) {
    .home-booking__days {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .home-booking__days {
        grid-template-columns: repeat(1, 1fr);
    }

    .home-booking__day {
        flex-direction: row;
        align-items: center;
        min-height: auto;
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .home-booking__day-header {
        margin-bottom: 0;
        min-width: 60px;
        text-align: left;
    }

    .home-booking__day-name {
        margin-bottom: 0;
    }

    .home-booking__day-slots {
        flex-direction: row;
        flex: 1;
        justify-content: flex-end;
        gap: 0.75rem;
    }

    .home-booking__slot-status span {
        display: none;
    }

    .home-booking__slot-status svg {
        display: block;
    }

    .home-booking__slot-status {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 50%;
    }

    .home-booking__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-booking-modal__content {
        border-radius: 1rem;
    }

    .home-booking-modal__header,
    .home-booking-modal__form {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
