/* 
 * Calendar Integration Styles
 * Phase 7 - Native Booking System
 * 
 * @package MarketDope_Service_Manager
 * @since 2.0.0
 */

/* Calendar Buttons */
.md-calendar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.md-calendar-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
    color: white;
    min-width: 140px;
    justify-content: center;
}

.md-calendar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
}

.md-calendar-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3);
}

/* Provider-specific colors */
.md-calendar-btn-google {
    background-color: #4285f4;
    border-color: #4285f4;
}

.md-calendar-btn-google:hover {
    background-color: #3367d6;
    border-color: #3367d6;
}

.md-calendar-btn-outlook {
    background-color: #0078d4;
    border-color: #0078d4;
}

.md-calendar-btn-outlook:hover {
    background-color: #106ebe;
    border-color: #106ebe;
}

.md-calendar-btn-yahoo {
    background-color: #6001d2;
    border-color: #6001d2;
}

.md-calendar-btn-yahoo:hover {
    background-color: #5001b8;
    border-color: #5001b8;
}

.md-calendar-btn-office365 {
    background-color: #0078d4;
    border-color: #0078d4;
}

.md-calendar-btn-office365:hover {
    background-color: #106ebe;
    border-color: #106ebe;
}

/* Icons in calendar buttons */
.md-calendar-btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Email-specific calendar buttons (table layout) */
.email-calendar-buttons {
    margin: 1rem 0;
}

.email-calendar-buttons table {
    border-collapse: separate;
    border-spacing: 10px;
}

.email-calendar-buttons a {
    display: inline-block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    min-width: 140px;
    text-align: center;
}

/* Booking Confirmation Page Styles */
.md-booking-confirmation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.confirmation-header {
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    animation: checkmark-bounce 0.6s ease-in-out;
}

@keyframes checkmark-bounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.confirmation-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 1rem;
}

.confirmation-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Card Styles */
.booking-details-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.booking-details-card .card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    padding: 1.5rem;
}

.detail-row {
    padding: 1rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    color: #212529;
}

.datetime-highlight {
    background: linear-gradient(135deg, #e7f3ff, #cce7ff);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.datetime-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: #007bff;
}

.end-time-display {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Booking Code Styles */
.booking-code {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.copy-btn {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.copy-btn:hover {
    color: #007bff;
}

/* Calendar Integration Section */
.calendar-integration-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.calendar-integration-card .card-header {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border: none;
    padding: 1.5rem;
}

.calendar-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.ics-download-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.ics-download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ics-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* Action Buttons */
.action-buttons {
    margin: 2rem 0;
}

.action-btn {
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.action-btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.action-btn-secondary {
    background: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

.action-btn-secondary:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
}

/* Information Cards */
.info-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.info-card-success {
    border-left: 4px solid #28a745;
}

.info-card-info {
    border-left: 4px solid #17a2b8;
}

.info-card-warning {
    border-left: 4px solid #ffc107;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list i {
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    width: 1.25rem;
    flex-shrink: 0;
}

/* Contact Section */
.contact-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    text-align: center;
    padding: 2rem;
}

.contact-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.contact-links a:hover {
    text-decoration: underline;
}

/* Timezone Notice */
.timezone-notice {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    margin-top: 2rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 1rem 1.5rem;
    background-color: #28a745;
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: toast-slide-in 0.3s ease-out;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .md-calendar-buttons {
        flex-direction: column;
    }
    
    .md-calendar-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .calendar-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .confirmation-title {
        font-size: 2rem;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .datetime-highlight {
        padding: 1rem;
    }
    
    .action-buttons .btn-group {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .confirmation-header {
        padding: 1rem 0;
    }
    
    .confirmation-title {
        font-size: 1.75rem;
    }
    
    .confirmation-subtitle {
        font-size: 1rem;
    }
    
    .booking-details-card .card-header {
        padding: 1rem;
    }
    
    .detail-row {
        padding: 0.75rem 0;
    }
    
    .ics-download-section {
        padding: 1rem;
        margin-top: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .booking-code {
        background-color: #343a40;
        border-color: #495057;
        color: #f8f9fa;
    }
    
    .detail-label {
        color: #dee2e6;
    }
    
    .detail-value {
        color: #f8f9fa;
    }
    
    .timezone-notice {
        background-color: #343a40;
        color: #adb5bd;
    }
    
    .ics-download-section {
        background: linear-gradient(135deg, #343a40, #495057);
        border-color: #495057;
    }
    
    .contact-card {
        background: linear-gradient(135deg, #343a40, #495057);
        border-color: #495057;
    }
    
    .contact-title {
        color: #dee2e6;
    }
}

/* Print Styles */
@media print {
    .md-calendar-buttons,
    .action-buttons,
    .ics-download-section {
        display: none !important;
    }
    
    .info-card,
    .booking-details-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .confirmation-header .success-icon {
        font-size: 2rem !important;
    }
    
    .contact-links a {
        color: #000 !important;
        text-decoration: underline !important;
    }
}