/**
 * Frontend CSS
 * Path: assets/frontend.css
 */

:root {
    --prbs-primary: #4f46e5;
    --prbs-primary-dark: #4338ca;
    --prbs-success: #10b981;
    --prbs-danger: #ef4444;
    --prbs-warning: #f59e0b;
    --prbs-gray-50: #f9fafb;
    --prbs-gray-100: #f3f4f6;
    --prbs-gray-200: #e5e7eb;
    --prbs-gray-300: #d1d5db;
    --prbs-gray-600: #4b5563;
    --prbs-gray-700: #374151;
    --prbs-gray-900: #111827;
    --prbs-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --prbs-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --prbs-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --prbs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --prbs-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Main Wrapper */
.prbs-booking-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.prbs-booking-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--prbs-shadow-xl);
    padding: 40px;
    position: relative;
}

.prbs-booking-header {
    text-align: center;
    margin-bottom: 40px;
}

.prbs-booking-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--prbs-gray-900);
    margin: 0 0 8px 0;
}

.prbs-booking-header p {
    font-size: 16px;
    color: var(--prbs-gray-600);
    margin: 0;
}

/* Form Steps */
.prbs-form-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.prbs-form-step.prbs-step-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.prbs-step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: var(--prbs-gray-900);
    margin: 0 0 30px 0;
}

.prbs-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--prbs-primary);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
}

/* Room Cards Grid */
.prbs-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.prbs-room-card {
    background: var(--prbs-gray-50);
    border: 2px solid var(--prbs-gray-200);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.prbs-room-card:hover {
    border-color: var(--prbs-primary);
    box-shadow: var(--prbs-shadow-lg);
    transform: translateY(-4px);
}

.prbs-room-card.prbs-room-selected {
    border-color: var(--prbs-primary);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.prbs-room-icon {
    width: 48px;
    height: 48px;
    background: var(--prbs-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.prbs-room-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.prbs-room-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--prbs-gray-900);
    margin: 0 0 12px 0;
}

.prbs-room-details {
    margin-bottom: 16px;
}

.prbs-capacity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--prbs-gray-600);
}

.prbs-capacity svg {
    width: 18px;
    height: 18px;
}

.prbs-room-pricing {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.prbs-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--prbs-gray-100);
    font-size: 14px;
}

.prbs-price-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.prbs-price-item span {
    color: var(--prbs-gray-600);
}

.prbs-price-item strong {
    color: var(--prbs-primary);
    font-weight: 600;
}

.prbs-price-item small {
    display: block;
    color: var(--prbs-gray-500);
    font-size: 12px;
    margin-top: 2px;
}

.prbs-select-room-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--prbs-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prbs-select-room-btn:hover {
    background: var(--prbs-primary-dark);
    transform: scale(1.02);
}

.prbs-room-card.prbs-room-selected .prbs-select-room-btn {
    background: var(--prbs-success);
}

/* Form Elements */
.prbs-form-row {
    margin-bottom: 24px;
}

.prbs-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.prbs-form-group {
    margin-bottom: 20px;
}

.prbs-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--prbs-gray-700);
    margin-bottom: 8px;
}

.prbs-form-group label svg {
    width: 18px;
    height: 18px;
    color: var(--prbs-primary);
}

.prbs-form-group input[type="text"],
.prbs-form-group input[type="email"],
.prbs-form-group input[type="tel"],
.prbs-form-group input[type="date"],
.prbs-form-group input[type="time"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--prbs-gray-200);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.prbs-form-group input:focus {
    outline: none;
    border-color: var(--prbs-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Availability Info */
.prbs-availability-info {
    margin: 20px 0;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.prbs-availability-info > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}

.prbs-loading {
    color: var(--prbs-warning);
}

.prbs-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(245, 158, 11, 0.3);
    border-top-color: var(--prbs-warning);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.prbs-available {
    color: var(--prbs-success);
    background: #d1fae5;
}

.prbs-unavailable {
    color: var(--prbs-danger);
    background: #fee2e2;
}

.prbs-available svg,
.prbs-unavailable svg {
    width: 20px;
    height: 20px;
}

/* Price Summary */
.prbs-price-summary {
    background: var(--prbs-gray-50);
    border: 2px solid var(--prbs-gray-200);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.prbs-duration,
.prbs-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 16px;
}

.prbs-total-price {
    border-top: 2px solid var(--prbs-gray-200);
    margin-top: 10px;
    padding-top: 10px;
}

.prbs-total-price strong {
    font-size: 24px;
    color: var(--prbs-primary);
}

/* Payment Methods */
.prbs-payment-methods {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.prbs-payment-option {
    position: relative;
}

.prbs-payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.prbs-payment-option label {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--prbs-gray-50);
    border: 2px solid var(--prbs-gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prbs-payment-option label:hover {
    border-color: var(--prbs-primary);
    background: #eef2ff;
}

.prbs-payment-option input:checked + label {
    border-color: var(--prbs-primary);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.prbs-payment-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prbs-payment-icon svg {
    width: 24px;
    height: 24px;
    color: var(--prbs-primary);
}

.prbs-payment-details {
    flex: 1;
}

.prbs-payment-details strong {
    display: block;
    font-size: 16px;
    color: var(--prbs-gray-900);
    margin-bottom: 4px;
}

.prbs-payment-details span {
    font-size: 14px;
    color: var(--prbs-gray-600);
}

/* Booking Summary */
.prbs-booking-summary {
    background: var(--prbs-gray-50);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.prbs-booking-summary h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--prbs-gray-900);
    margin: 0 0 16px 0;
}

.prbs-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--prbs-gray-200);
    font-size: 15px;
}

.prbs-summary-item:last-child {
    border-bottom: none;
}

.prbs-summary-item span {
    color: var(--prbs-gray-600);
}

.prbs-summary-item strong {
    color: var(--prbs-gray-900);
}

.prbs-summary-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--prbs-gray-300);
    font-size: 18px;
}

.prbs-summary-total strong {
    font-size: 24px;
    color: var(--prbs-primary);
}

/* Buttons */
.prbs-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.prbs-btn svg {
    width: 20px;
    height: 20px;
}

.prbs-btn-primary {
    background: var(--prbs-primary);
    color: white;
}

.prbs-btn-primary:hover {
    background: var(--prbs-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--prbs-shadow-md);
}

.prbs-btn-secondary {
    background: var(--prbs-gray-200);
    color: var(--prbs-gray-700);
}

.prbs-btn-secondary:hover {
    background: var(--prbs-gray-300);
}

.prbs-btn-success {
    background: var(--prbs-success);
    color: white;
}

.prbs-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--prbs-shadow-md);
}

.prbs-form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 30px;
}

/* Progress Bar */
.prbs-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--prbs-gray-100);
}

.prbs-progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.prbs-progress-step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--prbs-gray-200);
    z-index: -1;
}

.prbs-progress-step:last-child::before {
    display: none;
}

.prbs-progress-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--prbs-gray-200);
    color: var(--prbs-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.prbs-progress-active .prbs-progress-number {
    background: var(--prbs-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.prbs-progress-label {
    font-size: 14px;
    color: var(--prbs-gray-600);
    font-weight: 500;
}

.prbs-progress-active .prbs-progress-label {
    color: var(--prbs-primary);
    font-weight: 600;
}

/* Success Modal */
.prbs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.prbs-modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.prbs-success-icon {
    width: 80px;
    height: 80px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.prbs-success-icon svg {
    width: 48px;
    height: 48px;
    color: var(--prbs-success);
}

.prbs-modal-content h3 {
    font-size: 24px;
    color: var(--prbs-gray-900);
    margin: 0 0 12px 0;
}

.prbs-modal-content p {
    font-size: 16px;
    color: var(--prbs-gray-600);
    margin: 0 0 24px 0;
}

/* Messages */
.prbs-form-messages {
    margin-top: 20px;
}

.prbs-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.prbs-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.prbs-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Responsive */
@media (max-width: 768px) {
    .prbs-booking-container {
        padding: 24px;
    }
    
    .prbs-rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .prbs-form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .prbs-progress-bar {
        flex-wrap: wrap;
    }
    
    .prbs-progress-step {
        flex: 0 0 50%;
        margin-bottom: 20px;
    }
    
    .prbs-form-actions {
        flex-direction: column;
    }
    
    .prbs-btn {
        width: 100%;
    }
}