/* AG Mentor 2GG Frontend Styles */

/* Main Booking Container */
.ag-mentor-booking-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    position: relative;
}

.ag-mentor-booking-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ag-mentor-booking-container.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 #0073aa;
    border-radius: 50%;
    animation: ag-mentor-spin 1s linear infinite;
}

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

/* Booking Header */
.ag-mentor-booking-header {
    text-align: center;
    margin-bottom: 25px;
}

.ag-mentor-booking-header h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.5em;
    font-weight: 600;
}

.ag-mentor-booking-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Date Selection */
.ag-mentor-date-selection {
    margin-bottom: 25px;
}

.ag-mentor-date-selection label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

#ag-mentor-date {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.3s ease;
}

#ag-mentor-date:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

#ag-mentor-date:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Selected Date Details */
.ag-mentor-selected-details {
    margin-top: 20px;
}

.ag-mentor-selected-dates {
    background: #fff;
    border: 2px solid #46b450;
    border-radius: 6px;
    padding: 20px;
}

.ag-mentor-selected-dates h4 {
    color: #46b450;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ag-mentor-selected-dates h4::before {
    content: '✓';
    background: #46b450;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.date-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.date-details p {
    margin: 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

.date-details strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.booking-confirmation .success-message {
    color: #46b450;
    font-weight: 600;
    margin: 0;
    font-size: 14px;
}

/* Validation States */
.ag-mentor-validating {
    color: #0073aa;
    font-style: italic;
    text-align: center;
    margin: 15px 0;
}

.ag-mentor-validation-error {
    background: #fff;
    border: 2px solid #dc3232;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.ag-mentor-validation-error .error-message {
    color: #dc3232;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.ag-mentor-validation-error p:last-child {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Booking Information */
.ag-mentor-booking-info {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.ag-mentor-booking-info h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ag-mentor-booking-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ag-mentor-booking-info li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ag-mentor-booking-info li:last-child {
    border-bottom: none;
}

.ag-mentor-booking-info strong {
    color: #333;
    min-width: 120px;
}

/* No Dates Available */
.ag-mentor-no-dates {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 20px 0;
}

/* Error and Success Messages */
.ag-mentor-error,
.ag-mentor-success {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

.ag-mentor-error p,
.ag-mentor-success p {
    margin: 0;
}

/* Refresh Button */
.ag-mentor-refresh-container {
    text-align: center;
    margin-top: 15px;
}



/* Cart Integration */
.woocommerce-cart .ag-mentor-booking-data {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-size: 13px;
}

.woocommerce-cart .ag-mentor-booking-data strong {
    color: #333;
}

.woocommerce-checkout .ag-mentor-booking-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.woocommerce-checkout .ag-mentor-booking-summary h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.woocommerce-checkout .ag-mentor-booking-summary p {
    margin: 5px 0;
    font-size: 14px;
}

/* Payment Method Notice */
.ag-mentor-cod-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
}

.ag-mentor-cod-notice h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

.ag-mentor-cod-notice p {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ag-mentor-booking-container {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .ag-mentor-booking-header h3 {
        font-size: 1.3em;
    }
    
    .ag-mentor-date-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .date-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .ag-mentor-booking-info li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ag-mentor-booking-info strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .ag-mentor-booking-container {
        padding: 15px 10px;
        margin: 10px 0;
    }
    
    .ag-mentor-selected-dates {
        padding: 15px;
    }
    
    .ag-mentor-booking-info {
        padding: 15px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ag-mentor-booking-container {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }
    
    .ag-mentor-booking-header h3 {
        color: #fff;
    }
    
    .ag-mentor-booking-header p {
        color: #ccc;
    }
    
    .ag-mentor-date-selection label {
        color: #fff;
    }
    
    #ag-mentor-date {
        background: #3c3c3c;
        border-color: #555;
        color: #fff;
    }
    
    #ag-mentor-date:focus {
        border-color: #0073aa;
    }
    
    .ag-mentor-selected-dates,
    .ag-mentor-booking-info {
        background: #3c3c3c;
        border-color: #555;
    }
    
    .ag-mentor-booking-info h4 {
        color: #fff;
        border-color: #555;
    }
    
    .ag-mentor-booking-info li {
        border-color: #444;
    }
    
    .ag-mentor-booking-info strong {
        color: #fff;
    }
    
    .date-details p {
        background: #444;
        color: #fff;
    }
    
    .date-details strong {
        color: #fff;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ag-mentor-booking-container {
        border: 2px solid #000;
    }
    
    #ag-mentor-date {
        border: 2px solid #000;
    }
    
    .ag-mentor-selected-dates {
        border: 2px solid #000;
    }
    
    .ag-mentor-booking-info {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #ag-mentor-date {
        transition: none;
    }
    
    .ag-mentor-booking-container.loading::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .ag-mentor-booking-container {
        background: #fff;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    
    
    .ag-mentor-error,
    .ag-mentor-success {
        border: 1px solid #000;
    }
}