/* Villa Booking System Styles */
.villa-booking-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Arial', sans-serif;
    position: relative;
    overflow: visible;
}

.villa-booking-container h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-header h4 {
    margin: 0;
    font-size: 18px;
    color: #34495e;
    font-weight: 500;
}

.prev-month, .next-month {
    background: #3498db;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-month:hover, .next-month:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* Calendar Grid */
.calendar-container {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: #7f8c8d;
    padding: 8px 4px;
    font-size: 12px;
    text-transform: uppercase;
}

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

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 45px;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.available {
    background: #e8f5e8;
    border: 2px solid #27ae60;
    color: #27ae60;
}

.calendar-day.available:hover,
.calendar-day.available.hover-highlight {
    background: #27ae60;
    color: white;
    transform: scale(1.05);
}

.calendar-day.booked {
    background: #ffeaea;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    cursor: not-allowed;
}

.calendar-day.past {
    background: #f8f9fa;
    color: #bdc3c7;
    cursor: not-allowed;
    border: 1px solid #ecf0f1;
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    z-index: 2;
}

.status-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
}

.available-icon {
    color: #27ae60;
}

.booked-icon {
    color: #e74c3c;
}

/* Booking Info */
.booking-info {
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
}

.legend-item span {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.legend-item span.available {
    background: #e8f5e8;
    border: 2px solid #27ae60;
}

.legend-item span.booked {
    background: #ffeaea;
    border: 2px solid #e74c3c;
}

/* Booking Actions */
.booking-actions {
    text-align: center;
}

.book-now-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff385c 0%, #e31c5f 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
}

.book-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 56, 92, 0.4);
    color: white;
    text-decoration: none;
}

/* Loading & Error States */
.loading, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

.error-message {
    color: #e74c3c;
    background: #ffeaea;
    border-radius: 8px;
    border: 1px solid #e74c3c;
}

/* Responsive Design */
@media (max-width: 600px) {
    .villa-booking-container {
        margin: 10px;
        padding: 15px;
    }
    
    .villa-booking-container h3 {
        font-size: 20px;
    }
    
    .calendar-day {
        min-height: 40px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .book-now-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .calendar-day {
        min-height: 35px;
    }
    
    .day-number {
        font-size: 11px;
    }
    
    .weekday {
        font-size: 10px;
        padding: 6px 2px;
    }
}

/* Animation for calendar load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-days {
    animation: fadeIn 0.5s ease-out;
}

/* Güncellenmiş Tooltip Stilleri - Tooltip'in üstte görünmesi için */
.calendar-day[title] {
    position: relative;
}

.calendar-day[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 200px;
    text-align: center;
    font-weight: 500;
}

.calendar-day[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
    z-index: 9999;
    pointer-events: none;
}

/* Üst sıradaki günler için tooltip'i alt tarafa yerleştir */
.calendar-days .calendar-day:nth-child(-n+7)[title]:hover::after {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(8px);
}

.calendar-days .calendar-day:nth-child(-n+7)[title]:hover::before {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(2px);
    border-top-color: transparent;
    border-bottom-color: #2c3e50;
}