/* Front-end Styles for Room Booking Plugin */

.rb-booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.rb-booking-header {
    text-align: center;
    margin-bottom: 30px;
}

.rb-booking-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

/* Form Groups */
.rb-form-group {
    margin-bottom: 20px;
}

.rb-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.rb-form-group input[type="text"],
.rb-form-group input[type="email"],
.rb-form-group input[type="tel"],
.rb-form-group input[type="number"],
.rb-form-group select,
.rb-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.rb-form-group input:focus,
.rb-form-group select:focus,
.rb-form-group textarea:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* Form Row */
.rb-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.rb-form-row .rb-form-group {
    margin-bottom: 0;
}

.rb-half {
    flex: 1;
}

@media (max-width: 600px) {
    .rb-form-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* Section Title */
.rb-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Room Cards Grid */
.rb-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0 30px;
}

.rb-room-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rb-room-card:hover {
    border-color: #4a90d9;
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.2);
}

.rb-room-card.selected {
    border-color: #4a90d9;
    background: #f8fafd;
}

.rb-room-image {
    height: 140px;
    overflow: hidden;
}

.rb-room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rb-room-content {
    padding: 15px;
}

.rb-room-content h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #333;
}

.rb-room-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.4;
}

.rb-room-meta {
    margin: 0 0 10px;
}

.rb-capacity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.rb-capacity svg {
    opacity: 0.7;
}

.rb-room-price {
    margin: 0 0 12px;
    font-size: 15px;
    color: #333;
}

.rb-room-price strong {
    color: #4a90d9;
    font-size: 18px;
}

.rb-select-room-btn {
    width: 100%;
    padding: 10px;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.rb-select-room-btn:hover {
    background: #3a7cc0;
}

/* Selected Room Display */
.rb-selected-room {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8fafd;
    border: 2px solid #4a90d9;
    border-radius: 12px;
    margin-bottom: 25px;
}

.rb-selected-room img {
    width: 150px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.rb-room-info h3 {
    margin: 0 0 10px;
    color: #333;
}

.rb-room-info p {
    margin: 0 0 8px;
    color: #666;
    font-size: 14px;
}

.rb-room-capacity span {
    display: inline-block;
    margin-right: 15px;
}

@media (max-width: 500px) {
    .rb-selected-room {
        flex-direction: column;
    }
    
    .rb-selected-room img {
        width: 100%;
        height: 180px;
    }
}

/* Price Summary */
.rb-price-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
}

.rb-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.rb-price-row.rb-total {
    font-size: 20px;
    font-weight: 700;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.rb-price-note {
    margin: 15px 0 0;
    font-size: 12px;
    opacity: 0.8;
}

/* Submit Button */
.rb-form-submit {
    margin-top: 30px;
}

.rb-submit-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.rb-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.rb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.rb-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 15px;
}

.rb-message.rb-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rb-message.rb-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* No rooms message */
.rb-no-rooms {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Flatpickr customization */
.flatpickr-calendar {
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    background: #ffebee !important;
    color: #c62828 !important;
    text-decoration: line-through;
}

.flatpickr-day.selected {
    background: #667eea !important;
    border-color: #667eea !important;
}

/* Loading state */
.rb-loading {
    position: relative;
    pointer-events: none;
}

.rb-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: rb-spin 1s linear infinite;
}

@keyframes rb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
