/* Customer Login Widget Styles */

.mrc-customer-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: var(--mrc-font-family-base);
}

.mrc-customer-status {
    text-align: center;
}

.mrc-customer-login-link {
    color: white !important;
    text-decoration: none !important;
    font-weight: 600;
    padding: 10px 15px;
    display: inline-block;
    border-radius: 25px;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mrc-customer-login-link:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: white !important;
    text-decoration: none !important;
}

.mrc-customer-login-form {
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.mrc-login-title {
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: #4a5568;
}

.mrc-login-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* CRITICAL FIX: Ensure email input is always clickable */
.mrc-login-input input[type="email"],
.mrc-login-input input[type="text"],
.mrc-login-code-section input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
    z-index: 10;
    position: relative;
    pointer-events: auto !important;
    cursor: text !important;
}

.mrc-login-input input[type="email"]:focus,
.mrc-login-input input[type="text"]:focus,
.mrc-login-code-section input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mrc-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mrc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mrc-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mrc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mrc-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.mrc-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.mrc-customer-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.mrc-welcome-text {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.mrc-welcome-icon {
    font-size: 24px;
}

.mrc-customer-name {
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.mrc-discount-info {
    font-size: var(--mrc-text-sm);
    background: rgba(255,215,0,0.2);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: 600;
    text-shadow: none;
    border: 1px solid rgba(255,215,0,0.3);
}

.mrc-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.mrc-message-success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.mrc-message-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.mrc-message-info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #63b3ed;
}

.mrc-loading {
    opacity: 0.7;
    font-style: italic;
}

.mrc-error {
    color: #fed7d7;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mrc-customer-widget {
        padding: 12px 15px;
        margin-bottom: 15px;
    }
    
    .mrc-login-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mrc-login-input input[type="text"] {
        margin-bottom: 10px;
    }
    
    .mrc-customer-welcome {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .mrc-welcome-text {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .mrc-discount-info {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Animation for smooth transitions */
.mrc-customer-widget * {
    transition: all 0.3s ease;
}

/* Integration with existing calendar styles */
.mrc-calendar-container .mrc-customer-widget {
    margin-bottom: 25px;
}

/* Price indication with discount */
.fc-daygrid-event.mrc-discounted-price {
    border-left: 4px solid #ffd700 !important;
}

.fc-daygrid-event.mrc-discounted-price .fc-event-title::after {
    content: " 🏷️";
    font-size: var(--mrc-text-sm);
}

.mrc-original-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: var(--mrc-text-sm);
}

.mrc-discounted-price-text {
    color: #059669;
    font-weight: bold;
}

/* Pre-filled form fields for logged-in customers */
.pre-filled {
    background: linear-gradient(135deg, #f0fff4, #e8f5e9) !important;
    border: 2px solid #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1) !important;
}

.pre-filled:focus {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2) !important;
}

/* Customer Bookings Modal */
.mrc-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mrc-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.mrc-modal-header {
    background: linear-gradient(135deg, #840e12 0%, #c41419 100%);
    color: white;
    padding: 20px 25px;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.mrc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.mrc-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.mrc-close:hover,
.mrc-close:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    text-decoration: none;
}

.mrc-modal-body {
    padding: 25px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.booking-item {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.booking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.booking-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.booking-status-pending {
    border-left: 4px solid #f59e0b;
}

.booking-status-confirmed {
    border-left: 4px solid #10b981;
}

.booking-status-cancelled {
    border-left: 4px solid #ef4444;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.booking-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.booking-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--mrc-text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-status-pending .booking-status {
    background: #fef3c7;
    color: #d97706;
}

.booking-status-confirmed .booking-status {
    background: #d1fae5;
    color: #065f46;
}

.booking-status-cancelled .booking-status {
    background: #fee2e2;
    color: #991b1b;
}

.booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.booking-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.booking-detail-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.booking-detail-content {
    flex: 1;
}

.booking-detail-label {
    font-weight: 600;
    color: #374151;
    font-size: var(--mrc-text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.booking-detail-value {
    color: #1f2937;
    font-size: 14px;
}

.booking-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.booking-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    font-size: var(--mrc-text-sm);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.booking-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.booking-action-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.booking-action-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.booking-action-secondary:hover {
    background: #e5e7eb;
}

.no-bookings {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

.no-bookings::before {
    content: '📅';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

.loading::before {
    content: '⏳';
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 30px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 20px 0;
}

.error::before {
    content: '⚠️';
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .mrc-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .mrc-modal-header {
        padding: 15px 20px;
    }
    
    .mrc-modal-header h2 {
        font-size: 20px;
    }
    
    .mrc-modal-body {
        padding: 20px 15px;
    }
    
    .booking-details {
        grid-template-columns: 1fr;
    }
    
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .booking-actions {
        justify-content: center;
    }
}
