/**
 * Room Selection Cards Styles for Mokka Apartman
 */

.room-selection-container {
    margin: 1rem 0;
}

.floor-section {
    margin-bottom: 2rem;
}

.floor-title {
    font-size: 1.1rem;
    border-bottom: 2px solid #AB7442;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem !important;
}

.room-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.room-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.room-card:hover {
    border-color: #AB7442;
    box-shadow: 0 4px 15px rgba(171, 116, 66, 0.15);
    transform: translateY(-2px);
}

.room-card.selected {
    border-color: #AB7442;
    background: linear-gradient(135deg, #AB7442 0%, #96653a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(171, 116, 66, 0.3);
}

.room-card.selected .room-status {
    color: #fff;
}

.room-card.selected .room-details {
    color: rgba(255, 255, 255, 0.9);
}

.room-card.unavailable {
    background: #f8f9fa;
    border-color: #dee2e6;
    opacity: 0.6;
    cursor: not-allowed;
}

.room-card.unavailable:hover {
    transform: none;
    box-shadow: none;
    border-color: #dee2e6;
}

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

.room-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

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

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

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

.room-status.selected-status {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.room-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.room-detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.room-detail-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.room-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.amenity-badge {
    background: #f8f9fa;
    color: #495057;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.room-card.selected .amenity-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.room-selection-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #AB7442;
}

.selection-summary {
    font-weight: 600;
    color: #AB7442;
    margin-bottom: 0.5rem;
}

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

/* Multiple selection styles */
.room-card.multiple-selection {
    border-color: #AB7442;
    background: linear-gradient(135deg, rgba(171, 116, 66, 0.1) 0%, rgba(150, 101, 58, 0.1) 100%);
}

.selection-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #AB7442;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive design */
@media (max-width: 768px) {
    .room-selection-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .room-details {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .room-amenities {
        gap: 0.25rem;
    }
    
    .amenity-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .room-card {
        padding: 0.75rem;
    }
    
    .room-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .room-name {
        font-size: 1rem;
    }
    
    .room-details {
        font-size: 0.8rem;
    }
}

/* Animation for availability updates */
@keyframes availabilityUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.room-card.updating {
    animation: availabilityUpdate 0.6s ease-in-out;
}

/* Loading state */
.room-card.loading {
    position: relative;
}

.room-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-card.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #AB7442;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

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

.room-card[aria-pressed="true"] {
    background: linear-gradient(135deg, #AB7442 0%, #96653a 100%);
    color: white;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .room-card {
        border-width: 3px;
    }
    
    .room-card.selected {
        border-color: #000;
        color: #fff;
    }
    
    .room-status {
        border: 1px solid currentColor;
    }
}