/**
 * Multi-Business Booking System - Frontend Styles
 * Developed by scdev - Professional WordPress Development
 * Website: https://scdev.pro
 */

/* CSS Variables */
:root {
    --mbb-primary: #667eea;
    --mbb-secondary: #764ba2;
    --mbb-success: #4CAF50;
    --mbb-warning: #ff9800;
    --mbb-error: #f44336;
    --mbb-text: #333333;
    --mbb-text-light: #666666;
    --mbb-border: #e1e5e9;
    --mbb-background: #f8f9fa;
    --mbb-white: #ffffff;
    --mbb-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --mbb-radius: 8px;
    --mbb-transition: all 0.3s ease;
}

/* Container Styles */
.mbb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.mbb-card {
    background: var(--mbb-white);
    border-radius: var(--mbb-radius);
    box-shadow: var(--mbb-shadow);
    padding: 30px;
    margin-bottom: 20px;
}

.mbb-card-header {
    border-bottom: 2px solid var(--mbb-border);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.mbb-card-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--mbb-text);
    margin: 0;
}

/* Booking Form Styles */
.mbb-booking-form {
    max-width: 600px;
    margin: 0 auto;
}

.mbb-form-group {
    margin-bottom: 20px;
}

.mbb-form-label {
    display: block;
    font-weight: 600;
    color: var(--mbb-text);
    margin-bottom: 8px;
    font-size: 14px;
}

.mbb-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--mbb-border);
    border-radius: var(--mbb-radius);
    font-size: 16px;
    font-family: inherit;
    transition: var(--mbb-transition);
    box-sizing: border-box;
}

.mbb-form-control:focus {
    outline: none;
    border-color: var(--mbb-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mbb-form-control.error {
    border-color: var(--mbb-error);
}

.mbb-form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.mbb-form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Map Styles */
.mbb-map-container {
    margin-top: 10px;
}

.mbb-map-info {
    margin-top: 10px;
    padding: 12px;
    background: #e7f3ff;
    border-radius: 6px;
    border-left: 3px solid #2196F3;
}

.mbb-map-info small {
    color: #333;
    line-height: 1.5;
}

/* Button Styles */
.mbb-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--mbb-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--mbb-transition);
    line-height: 1.5;
    min-width: 120px;
}

.mbb-btn-primary {
    background: linear-gradient(135deg, var(--mbb-primary) 0%, var(--mbb-secondary) 100%);
    color: white;
}

.mbb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.mbb-btn-secondary {
    background: var(--mbb-background);
    color: var(--mbb-text);
    border: 2px solid var(--mbb-border);
}

.mbb-btn-secondary:hover {
    background: var(--mbb-border);
    color: var(--mbb-text);
}

.mbb-btn-success {
    background: var(--mbb-success);
    color: white;
}

.mbb-btn-warning {
    background: var(--mbb-warning);
    color: white;
}

.mbb-btn-danger {
    background: var(--mbb-error);
    color: white;
}

.mbb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.mbb-btn-loading {
    position: relative;
    color: transparent !important;
}

.mbb-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: mbb-spin 1s linear infinite;
}

@keyframes mbb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Services Grid */
.mbb-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mbb-service-card {
    background: var(--mbb-white);
    border-radius: var(--mbb-radius);
    box-shadow: var(--mbb-shadow);
    padding: 20px;
    transition: var(--mbb-transition);
}

.mbb-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.mbb-service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--mbb-radius);
    margin-bottom: 15px;
    display: block;
}

.mbb-service-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--mbb-text);
    margin-bottom: 10px;
}

.mbb-service-description {
    color: var(--mbb-text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.mbb-service-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--mbb-primary);
    margin-bottom: 15px;
}

.mbb-service-duration {
    font-size: 14px;
    color: var(--mbb-text-light);
    margin-bottom: 15px;
}

/* Time Slots */
.mbb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.mbb-time-slot {
    padding: 10px 15px;
    border: 2px solid var(--mbb-border);
    border-radius: var(--mbb-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--mbb-transition);
    background: var(--mbb-white);
}

.mbb-time-slot:hover {
    border-color: var(--mbb-primary);
    background: rgba(102, 126, 234, 0.1);
}

.mbb-time-slot.selected {
    background: var(--mbb-primary);
    color: white;
    border-color: var(--mbb-primary);
}

.mbb-time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--mbb-background);
}

/* Messages */
.mbb-message {
    padding: 15px 20px;
    border-radius: var(--mbb-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.mbb-message-success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--mbb-success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.mbb-message-error {
    background: rgba(244, 67, 54, 0.1);
    color: var(--mbb-error);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.mbb-message-warning {
    background: rgba(255, 152, 0, 0.1);
    color: var(--mbb-warning);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.mbb-message-info {
    background: rgba(102, 126, 234, 0.1);
    color: var(--mbb-primary);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Dashboard Styles */
.mbb-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.mbb-sidebar {
    background: var(--mbb-white);
    border-radius: var(--mbb-radius);
    box-shadow: var(--mbb-shadow);
    padding: 20px;
    height: fit-content;
}

.mbb-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mbb-sidebar-menu li {
    margin-bottom: 5px;
}

.mbb-sidebar-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--mbb-text);
    text-decoration: none;
    border-radius: var(--mbb-radius);
    transition: var(--mbb-transition);
}

.mbb-sidebar-menu a:hover,
.mbb-sidebar-menu a.active {
    background: var(--mbb-primary);
    color: white;
}

.mbb-main-content {
    background: var(--mbb-white);
    border-radius: var(--mbb-radius);
    box-shadow: var(--mbb-shadow);
    padding: 30px;
}

/* Stats Cards */
.mbb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mbb-stat-card {
    background: linear-gradient(135deg, var(--mbb-primary) 0%, var(--mbb-secondary) 100%);
    color: white;
    padding: 20px;
    border-radius: var(--mbb-radius);
    text-align: center;
}

.mbb-stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.mbb-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Table Styles */
.mbb-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.mbb-table th,
.mbb-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--mbb-border);
}

.mbb-table th {
    background: var(--mbb-background);
    font-weight: 600;
    color: var(--mbb-text);
}

.mbb-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Status Badges */
.mbb-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.mbb-status-pending {
    background: rgba(255, 152, 0, 0.1);
    color: var(--mbb-warning);
}

.mbb-status-confirmed {
    background: rgba(76, 175, 80, 0.1);
    color: var(--mbb-success);
}

.mbb-status-cancelled {
    background: rgba(244, 67, 54, 0.1);
    color: var(--mbb-error);
}

.mbb-status-completed {
    background: rgba(102, 126, 234, 0.1);
    color: var(--mbb-primary);
}

/* Business Profile */
.mbb-business-profile {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: start;
}

.mbb-business-logo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--mbb-radius);
    box-shadow: var(--mbb-shadow);
}

.mbb-business-info h2 {
    color: var(--mbb-text);
    margin-bottom: 15px;
}

.mbb-business-info p {
    color: var(--mbb-text-light);
    line-height: 1.6;
    margin-bottom: 10px;
}

.mbb-contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.mbb-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mbb-contact-icon {
    width: 20px;
    height: 20px;
    color: var(--mbb-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mbb-container {
        padding: 10px;
    }
    
    .mbb-card {
        padding: 20px;
    }
    
    .mbb-dashboard {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mbb-services-grid {
        grid-template-columns: 1fr;
    }
    
    .mbb-time-slots {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .mbb-business-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .mbb-business-logo {
        margin: 0 auto;
    }
    
    .mbb-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mbb-table {
        font-size: 14px;
    }
    
    .mbb-table th,
    .mbb-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .mbb-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .mbb-time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mbb-contact-info {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.mbb-loading {
    text-align: center;
    padding: 40px;
    color: var(--mbb-text-light);
}

.mbb-loading::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--mbb-border);
    border-top: 4px solid var(--mbb-primary);
    border-radius: 50%;
    animation: mbb-spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Animations */
.mbb-fade-in {
    animation: mbb-fade-in 0.5s ease-in-out;
}

@keyframes mbb-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Break Time Inputs */
.mbb-break-time {
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    border: 1px dashed #ccc;
}

.mbb-time-input {
    padding: 6px 10px;
    border: 1px solid var(--mbb-border);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    transition: var(--mbb-transition);
    background: white;
    min-width: 90px;
}

.mbb-time-input:focus {
    outline: none;
    border-color: var(--mbb-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.mbb-time-input::placeholder {
    color: #999;
    font-size: 12px;
}

/* Accessibility */
.mbb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.mbb-btn:focus,
.mbb-form-control:focus,
.mbb-time-slot:focus {
    outline: 2px solid var(--mbb-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mbb-card {
        border: 2px solid var(--mbb-text);
    }
    
    .mbb-form-control {
        border-width: 2px;
    }
}


/* Modal Styles */
.mbb-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.mbb-modal.active {
    display: flex !important;
}

/* Prevent body scroll when modal is open */
body.mbb-modal-open {
    overflow: hidden !important;
}

.mbb-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mbb-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mbb-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.mbb-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.mbb-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.mbb-modal-body {
    padding: 25px;
}

.mbb-modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Mobile Modal Optimization */
@media (max-width: 768px) {
    .mbb-modal {
        padding: 10px;
    }
    
    .mbb-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .mbb-modal-header {
        padding: 15px 20px;
    }
    
    .mbb-modal-header h3 {
        font-size: 18px;
    }
    
    .mbb-modal-body {
        padding: 20px;
    }
    
    .mbb-modal-footer {
        padding: 15px 20px;
    }
}
