/* Import CSS variables for consistency */
:root {
    --primary-color: #1a4d2e;
    --secondary-color: #4a7c59;
    --accent-color: #d4a574;
    --background-color: #f8f9fa;
    --text-color: #1a1a1a;
    --text-light: #4a4a4a;
    --white: #ffffff;
    --border-color: #d1d5db;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

/* Modern Calendar Styles */
.multi-month-calendar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 2rem 0;
}

.calendar-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calendar-header h2 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.calendar-instructions {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.calendar-instructions p {
    margin: 0;
    color: #495057;
    font-size: 1rem;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.legend-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legend-available { 
    background-color: #4CAF50; 
    border-color: #45a049;
}

.legend-available::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.legend-booked { 
    background-color: #f44336; 
    border-color: #d32f2f;
}

.legend-booked::after {
    content: '✗';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.legend-checkin { 
    position: relative;
    background: linear-gradient(135deg, #4CAF50 50%, #f44336 50%);
    border: 2px solid #45a049;
    overflow: hidden;
}

.legend-checkin::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 8px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-checkout { 
    position: relative;
    background: linear-gradient(135deg, #f44336 50%, #4CAF50 50%);
    border: 2px solid #d32f2f;
    overflow: hidden;
}

.legend-checkout::after {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 8px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-blocked { 
    background-color: #f44336; 
    border-color: #d32f2f;
}

.legend-blocked::after {
    content: '✗';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.legend-selected { 
    background-color: #ff9800; 
    border-color: #f57c00;
}

.legend-selected::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.month-calendar {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.month-header {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day-header {
    background: #f5f5f5;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.day-header:last-child {
    border-right: none;
}

.calendar-day {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    position: relative;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day.other-month,
.calendar-day.past-date {
    color: #ccc;
    background: #fafafa;
    cursor: default;
}

.calendar-day.available {
    background: #4CAF50;
    color: white;
    font-weight: 600;
    border: 2px solid #45a049;
    position: relative;
}

.calendar-day.available::before {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.calendar-day.available:hover {
    background: #45a049;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
}

.calendar-day.booked {
    background: #f44336;
    color: white;
    font-weight: 600;
    cursor: not-allowed;
    border: 2px solid #d32f2f;
    position: relative;
}

.calendar-day.booked::before {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.calendar-day.blocked {
    background: #f44336;
    color: white;
    font-weight: 600;
    cursor: not-allowed;
    border: 2px solid #d32f2f;
    position: relative;
}

.calendar-day.blocked::before {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.calendar-day.checkin {
    position: relative;
    background: #f44336; /* Red base */
    color: white;
    font-weight: 600;
    border-left: 2px solid #45a049;   /* Darker green (swapped) */
    border-right: 2px solid #d32f2f;  /* Darker red (swapped) */
    border-top: 2px solid #45a049;    /* Darker green (swapped) */
    border-bottom: 2px solid #d32f2f; /* Darker red (swapped) */
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}
.calendar-day.checkin:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
    z-index: 2;
}
.calendar-day.checkin::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4CAF50; /* Green triangle */
    clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
    z-index: -1;
}
.calendar-day.checkin::before {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* Modified for selected check-in: keep red base, make green areas orange */
.calendar-day.checkin.selected {
    background: #f44336; /* Keep red */
    border-left-color: #f57c00;  /* Orange instead of green */
    border-top-color: #f57c00;
    border-right-color: #d32f2f;
    border-bottom-color: #d32f2f;
}
.calendar-day.checkin.selected::after {
    background: #ff9800; /* Orange triangle */
}
.calendar-day.checkin.selected::before {
    content: '✓'; /* Same check icon */
    background: rgba(255, 255, 255, 0.2); /* Match original */
}

/* Simple pricing information styles */
.pricing-info {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.pricing-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.pricing-rates {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #333;
    font-size: 0.95rem;
}

.rate-item strong {
    color: var(--primary-color);
}

.rate-separator {
    color: #ccc;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Mobile responsive pricing info */
@media (max-width: 600px) {
    .pricing-rates {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .rate-separator {
        display: none;
    }
    
    .pricing-info {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .pricing-title {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .pricing-rates {
        font-size: 0.9rem;
    }
}

.calendar-day.checkout {
    position: relative;
    background: #4CAF50; /* Green base */
    color: white;
    font-weight: 600;
    border-left: 2px solid #d32f2f;
    border-right: 2px solid #45a049;
    border-top: 2px solid #d32f2f;
    border-bottom: 2px solid #45a049;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}
.calendar-day.checkout:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(244, 67, 54, 0.4);
    z-index: 2;
}
.calendar-day.checkout::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f44336; /* Red triangle */
    clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
    z-index: -1;
}
.calendar-day.checkout::before {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.calendar-day.checkin,
.calendar-day.checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Mobile responsiveness adjustments */
@media (max-width: 600px) {
    .calendar-day.checkin::before,
    .calendar-day.checkout::before {
        font-size: 8px;
        width: 12px;
        height: 12px;
    }
}
@media (max-width: 480px) {
    .calendar-day.checkin::before,
    .calendar-day.checkout::before {
        font-size: 7px;
        width: 10px;
        height: 10px;
    }
}

.calendar-day.selected {
    background: #ff9800;
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
    border: 3px solid #f57c00;
    position: relative;
}
.calendar-day.selected::before {
    content: '◆';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.calendar-day.selected:hover {
    background: #f57c00;
    transform: scale(1.02);
}


.calendar-day.weekend {
    color: #ccc;
    font-weight: 600;
}

.calendar-day.weekend.available {
    color: white;
}

.calendar-day.weekend.booked {
    color: white;
}

.calendar-day.weekend.checkin,
.calendar-day.weekend.checkout {
    color: white;
}

/* Selection indicators */
.calendar-day.range-start {
    background: #ff9800;
    color: white;
    font-weight: 700;
    border-radius: 8px 0 0 8px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.calendar-day.range-end {
    background: #ff9800;
    color: white;
    font-weight: 700;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.calendar-day.range-start:hover,
.calendar-day.range-end:hover {
    background: #f57c00;
}

.calendar-day.in-range {
    background: #ff9800;
    color: white;
    font-weight: 600;
}

.calendar-day.in-range:hover {
    background: #f57c00;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 1200px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 900px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .calendar-day {
        min-height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .calendar-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calendar-legend {
        gap: 0.5rem;
        flex-direction: column;
        padding: 1rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        flex: 1;
        justify-content: flex-start;
    }
    
    .legend-item span {
        line-height: 1.2;
    }
    
    .legend-item small {
        font-size: 0.7rem;
        opacity: 0.8;
    }
    
    .legend-color {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .multi-month-calendar {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .calendar-header h2 {
        font-size: 1.5rem;
    }
    
    .calendar-day {
        min-height: 45px;
        font-size: 0.9rem;
        padding: 0.4rem;
    }
    
    .calendar-day::before {
        font-size: 12px;
    }
    
    .calendar-day::after {
        width: 5px;
        height: 5px;
    }
    
    .calendar-day.checkin::before,
    .calendar-day.checkout::before {
        font-size: 8px;
        width: 12px;
        height: 12px;
    }
    
    .day-header {
        padding: 0.4rem;
        font-size: 0.75rem;
    }
    
    .month-header {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .expand-calendar-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .calendar-legend {
        padding: 0.8rem;
        gap: 0.4rem;
    }
    
    .legend-item {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }
    
    .legend-color {
        width: 18px;
        height: 18px;
    }
    
    .calendar-day {
        min-height: 40px;
        font-size: 0.85rem;
        padding: 0.3rem;
    }
    
         .calendar-day::before {
         font-size: 8px;
     }
     
     .calendar-day.checkin::before,
     .calendar-day.checkout::before {
         font-size: 7px;
         width: 10px;
         height: 10px;
     }
    
    .calendar-day::after {
        width: 4px;
        height: 4px;
    }
}

/* Animation for date selection */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.calendar-day.selected {
    animation: pulse 0.3s ease-in-out;
}

/* Enhanced Tooltip for dates */
.calendar-day {
    position: relative;
}

.calendar-day:hover {
    z-index: 100;
}

/* Calendar pagination controls */
.calendar-pagination {
    text-align: center;
    margin-top: 2rem;
}

.expand-calendar-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.expand-calendar-btn:hover {
    background: linear-gradient(135deg, #0f2e1c, #3d6b4a);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.expand-calendar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.expand-calendar-btn::after {
    content: '▼';
    transition: transform 0.3s ease;
}

.expand-calendar-btn.loading::after {
    content: '⟳';
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
} 