/**
 * Booking Calendar Styles for Mokka Apartman
 */

.booking-calendar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin: 2rem 0;
}

/* Booking Wizard Styles */
.wizard-steps {
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step-indicator {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
}

.step-indicator.active .step-circle {
    background: #8B4513;
    color: white;
}

.step-indicator.completed .step-circle {
    background: #8B4513;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.step-indicator.active .step-label {
    color: #8B4513;
    font-weight: bold;
}

.step-indicator.completed .step-label {
    color: #8B4513;
}

.wizard-content {
    min-height: 300px;
    padding: 2rem 1rem;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.wizard-step.active {
    display: block;
}

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

/* Brown theme colors to replace green */
.bg-brown {
    background-color: #8B4513 !important;
}

.text-brown {
    color: #8B4513 !important;
}

.alert-brown {
    color: #654321;
    background-color: #f4f1ec;
    border-color: #d4c5a3;
}

.alert-brown .alert-heading {
    color: inherit;
}

.alert-brown .alert-link {
    color: #4a2f15;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.calendar-header h4 {
    color: #AB7442;
    font-weight: 600;
    margin: 0;
}

.loading-indicator {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calendar-controls span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    min-width: 140px;
    text-align: center;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.available {
    background: #8B4513;
}

.legend-color.occupied {
    background: #dc3545;
}

.legend-color.selected {
    background: #AB7442;
}

.calendar-grid {
    display: grid;
    gap: 1px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

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

.calendar-cell {
    background: white;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.header-cell {
    background: #AB7442;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    min-height: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-cell {
    cursor: pointer;
    border: 2px solid transparent;
}

.day-cell:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.day-cell.selected {
    background: #AB7442;
    color: white;
    border-color: #96653a;
}

.day-cell.checkin {
    background: #8B4513;
    color: white;
    border-color: #1e7e34;
    border-radius: 6px 0 0 6px;
}

.day-cell.checkout {
    background: #dc3545;
    color: white;
    border-color: #bd2130;
    border-radius: 0 6px 6px 0;
}

.day-cell.in-range {
    background: #AB7442;
    color: white;
    border-color: transparent;
    opacity: 0.6;
}

.day-cell.other-month {
    color: #adb5bd;
    background: #f8f9fa;
}

.day-cell.other-month:hover {
    background: #e9ecef;
}

.day-cell.past-day {
    color: #adb5bd;
    cursor: not-allowed;
    background: #f8f9fa;
}

.day-cell.past-day:hover {
    transform: none;
    box-shadow: none;
    background: #f8f9fa;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
}

.availability-dots {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.availability-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: block;
}

.dot-available {
    background: #28a745; /* Zöld = szabad */
}

.dot-blocked {
    background: #dc3545; /* Piros = foglalt */
}

.room-availability h6 {
    color: #AB7442;
    font-weight: 600;
    margin-bottom: 1rem;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.room-item:hover {
    background: #e9ecef;
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.room-capacity {
    font-size: 0.8rem;
    color: #6c757d;
}

.room-status .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Toast container adjustments */
.toast-container {
    z-index: 1100;
}

/* Enhanced Mobile Responsiveness with iPhone Optimization */
@media (max-width: 768px) {
    .booking-calendar {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .calendar-legend {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        text-align: center;
    }
    
    .calendar-cell {
        min-height: 50px;
        touch-action: manipulation;
    }
    
    .day-cell {
        min-height: 50px !important;
        min-width: 50px !important;
        border-radius: 8px;
        font-size: 1rem;
    }
    
    .day-number {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .availability-dots {
        margin-top: 2px;
        gap: 1px;
    }
    
    .availability-dot {
        width: 5px;
        height: 5px;
    }
    
    .room-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .calendar-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .calendar-controls span {
        font-size: 1rem;
        min-width: 120px;
    }
    
    /* Better booking wizard on mobile */
    .wizard-steps .step-indicator {
        flex: 1;
        min-width: 60px;
    }
    
    .step-circle {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .booking-calendar {
        padding: 0.75rem;
        margin: 0.5rem 0;
    }
    
    .header-cell {
        font-size: 0.75rem;
        min-height: 40px;
        padding: 0.5rem 0.25rem;
    }
    
    .calendar-cell, .day-cell {
        min-height: 48px !important;
        min-width: 48px !important;
        font-size: 0.95rem;
    }
    
    .day-number {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .calendar-legend {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
    
    /* Touch-friendly calendar grid */
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-row {
        gap: 2px;
    }
    
    /* Better touch targets for step indicators */
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        text-align: center;
    }
    
    /* Improved room items */
    .room-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .room-info h6 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .room-capacity {
        font-size: 0.75rem;
    }
    
    /* Calendar controls improvements */
    .calendar-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .calendar-controls button {
        min-height: 44px;
        min-width: 44px;
        font-size: 1.2rem;
    }
    
    .calendar-controls span {
        font-size: 0.95rem;
        text-align: center;
    }
}

/* iPhone specific optimizations */
@media only screen and (max-width: 414px) {
    .booking-calendar {
        margin: 0.25rem;
        padding: 0.5rem;
    }
    
    .calendar-header h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    
    .legend-item {
        justify-content: center;
        font-size: 0.75rem;
    }
    
    .day-cell {
        min-height: 44px !important;
        min-width: 44px !important;
        font-size: 0.9rem;
    }
    
    .availability-dots {
        display: none; /* Hide dots on very small screens */
    }
    
    /* Simplified room selection */
    .room-item {
        padding: 0.5rem;
        border-radius: 6px;
    }
    
    .room-info h6 {
        font-size: 0.85rem;
    }
    
    .room-capacity {
        font-size: 0.7rem;
    }
}

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

.calendar-grid {
    animation: fadeIn 0.3s ease-out;
}

/* Accessibility improvements */
.day-cell:focus {
    outline: 2px solid #AB7442;
    outline-offset: 2px;
}

.room-item:focus {
    outline: 2px solid #AB7442;
    outline-offset: 2px;
}

/* Day Details Styles */
.clickable-day {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-day:hover {
    background-color: rgba(171, 116, 66, 0.1);
    transform: scale(1.02);
}

.clickable-day.selected {
    background: linear-gradient(135deg, #AB7442 0%, #96653a 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(171, 116, 66, 0.3);
}

.clickable-day.selected .day-number {
    color: white;
    font-weight: bold;
}

.day-summary {
    padding: 0.5rem 0;
}

.summary-card {
    transition: all 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.day-room-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.room-day-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.room-day-item:hover {
    border-color: #AB7442;
    box-shadow: 0 2px 8px rgba(171, 116, 66, 0.15);
    transform: translateY(-1px);
}

.room-day-item.selected {
    border-color: #AB7442;
    background: linear-gradient(135deg, rgba(171, 116, 66, 0.1) 0%, rgba(150, 101, 58, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(171, 116, 66, 0.2);
}

.room-day-item.occupied {
    background: #f8f9fa;
    opacity: 0.8;
}

.room-day-item.occupied:hover {
    border-color: #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.room-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.room-day-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-weight: 500;
}

.room-day-status.available {
    background: #d4edda;
    color: #155724;
}

.room-day-status.occupied {
    background: #f8d7da;
    color: #721c24;
}

.room-day-details {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Animation for day details section */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#day-details-section {
    animation: slideDown 0.3s ease-out;
}

/* Room Gallery Panel Styles */
.room-gallery-panel {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
    max-height: 600px;
    overflow-y: auto;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.gallery-header h5 {
    margin: 0;
    color: #AB7442;
    font-size: 1rem;
}

.room-images-grid {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.room-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.room-image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.room-image-item.active {
    border-color: #AB7442;
    box-shadow: 0 4px 15px rgba(171, 116, 66, 0.3);
}

.room-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.room-image-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.room-image-item:hover .image-overlay {
    opacity: 1;
}

.gallery-controls {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

.gallery-controls .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

#gallery-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#gallery-placeholder i {
    opacity: 0.5;
}

/* Animation for gallery section */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#room-gallery-section {
    animation: slideInRight 0.3s ease-out;
}

/* Responsive adjustments for gallery */
@media (max-width: 992px) {
    .room-gallery-panel {
        margin-top: 1rem;
        max-height: 300px;
    }
    
    .room-image-item img {
        height: 100px;
    }
}

/* Mobile gallery simplification - UX improvement */
@media (max-width: 768px) {
    .room-gallery-panel {
        max-height: 200px;
        padding: 0.5rem;
    }
    
    .gallery-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
    }
    
    .gallery-header h5 {
        font-size: 0.9rem;
    }
    
    .room-images-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.25rem !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.25rem;
    }
    
    .room-image-item {
        flex: 0 0 80px !important;
        min-width: 80px !important;
    }
    
    .room-image-item img {
        height: 60px !important;
        width: 80px !important;
        object-fit: cover !important;
    }
    
    /* Hide gallery navigation on mobile to save space */
    .gallery-nav,
    .gallery-counter {
        display: none !important;
    }
}

/* Extra small screens - further simplification */
@media (max-width: 480px) {
    .room-gallery-panel {
        max-height: 150px;
        padding: 0.25rem;
    }
    
    .gallery-header h5 {
        font-size: 0.8rem;
    }
    
    .room-image-item {
        flex: 0 0 60px !important;
        min-width: 60px !important;
    }
    
    .room-image-item img {
        height: 45px !important;
        width: 60px !important;
    }
}

/* Calendar responsive - single month below 1410px */
@media (max-width: 1410px) {
    .calendar-container {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .calendar-month:nth-child(2) {
        display: none !important;
    }
    
    .calendar-controls {
        display: flex !important;
        justify-content: center !important;
        margin-top: 1rem !important;
        gap: 1rem !important;
    }
    
    .month-nav-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.5rem 1rem !important;
        background: #AB7442 !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        font-size: 0.9rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .month-nav-btn:hover {
        background: #895d35 !important;
        transform: translateY(-1px) !important;
    }
    
    .dual-month-calendar-wrapper {
        max-width: 600px !important;
        margin: 0 auto !important;
    }
}

/* Tablet and mobile calendar adjustments */
@media (max-width: 992px) {
    .calendar-month {
        margin-bottom: 1rem !important;
    }
    
    .calendar-day-cell {
        font-size: 0.9rem !important;
        padding: 0.4rem !important;
    }
    
    .guest-selection-summary {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
}

/* Mobile specific calendar optimizations */
@media (max-width: 768px) {
    .dual-month-calendar-wrapper {
        margin: 0 !important;
        padding: 0 0.5rem !important;
    }
    
    .calendar-month {
        font-size: 0.85rem !important;
    }
    
    .calendar-day-cell {
        font-size: 0.8rem !important;
        padding: 0.3rem !important;
        min-height: 32px !important;
    }
    
    .month-nav-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
    
    .guest-selection-summary {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }
    
    .guest-selection-summary .summary-item {
        margin: 0 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .calendar-cell {
        border: 1px solid #333;
    }
    
    .day-cell:hover {
        border: 2px solid #000;
    }
    
    .availability-dot {
        border: 1px solid #000;
    }
    
    .room-day-item {
        border-width: 3px;
    }
    
    .clickable-day.selected {
        border: 3px solid #000;
    }
}

/* Room Gallery Styles */
#room-gallery-container {
    background: #f8f9fa;
}

.gallery-header {
    z-index: 10 !important;
}

.gallery-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-nav button:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

.gallery-thumbnails {
    max-height: 80px;
}

.gallery-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    object-fit: cover;
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
    border-color: #AB7442;
}

.gallery-thumbnail.active {
    border-color: #AB7442;
    transform: scale(1.1);
}

.gallery-counter {
    border-radius: 4px;
}

/* Room gallery animations */
#room-gallery-view {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Waiting for checkout styles */
.border-dashed {
    border: 2px dashed #dee2e6 !important;
}

.waiting-for-checkout {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 202, 240, 0.05) 100%);
    border: 1px solid rgba(13, 110, 253, 0.1);
    border-radius: 8px;
}

.waiting-for-checkout .alert {
    margin-bottom: 0;
}

/* Booking Steps Progress */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0.5rem;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-circle {
    background: #AB7442;
    color: white;
    transform: scale(1.1);
}

.step-indicator.completed .step-circle {
    background: #8B4513;
    color: white;
}

.step-indicator.completed .step-circle::before {
    content: '✓';
}

.step-indicator small {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
    transition: color 0.3s ease;
}

.step-indicator.active small {
    color: #AB7442;
    font-weight: 600;
}

.step-indicator.completed small {
    color: #8B4513;
}

/* Main booking form sections */
#step-2-checkout-details,
#step-4-contact-form {
    background: linear-gradient(135deg, rgba(171, 116, 66, 0.05) 0%, rgba(171, 116, 66, 0.02) 100%);
    border: 1px solid rgba(171, 116, 66, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

#step-2-checkout-details h5,
#step-4-contact-form h5 {
    border-bottom: 2px solid #AB7442;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}