/* =====================================================
   A1 SCHEDULE - EVENT MODAL NextModal Style
   Clean section-based design like NextModal.php
   ===================================================== */

/* Container */
.event-modal-container {
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* SweetAlert custom styling */
.swal2-container .swal2-popup.swal2-show {
    max-width: 850px !important;
    width: 95vw !important;
}

.swal2-container .swal2-title {
    background: linear-gradient(135deg, #4a90e2 0%, #50c878 100%) !important;
    color: white !important;
    padding: 20px !important;
    margin: 0 !important;
    border-radius: 5px 5px 0 0 !important;
    font-size: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    width: auto !important;
    left: 0 !important;
    right: 0 !important;
}

.swal2-container .swal2-title::before {
    content: '';
    margin-right: 0 !important;
    font-size: 16px !important;
}

/* Fix for success/error popups */
.swal2-popup .swal2-title {
    background: linear-gradient(135deg, #4a90e2 0%, #50c878 100%) !important;
    color: white !important;
    padding: 15px 20px !important;
    margin: 0 0 20px 0 !important;
    border-radius: 5px 5px 0 0 !important;
    font-size: 18px !important;
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

.swal2-popup .swal2-title::before {
    content: '';
    margin-right: 0 !important;
    font-size: 14px !important;
}

.swal2-success .swal2-title::before {
    content: '✅';
}

.swal2-error .swal2-title::before {
    content: '❌';
}

@media (min-width: 1024px) {
    .swal2-container .swal2-popup.swal2-show {
        width: 800px !important;
    }
}

/* Section styles - exactly like NextModal */
.event-section {
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

.event-section:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Job Information Section - Blue */
.event-section--job {
    background: #f8f9fa !important;
    border: 2px solid #dee2e6 !important;
}

.event-section--job:hover {
    border-color: #007bff !important;
    background: #e3f2fd !important;
}

/* Contact Information Section - Green */
.event-section--contact {
    background: #e8f5e8 !important;
    border: 2px solid #c3e6c3 !important;
}

.event-section--contact:hover {
    border-color: #28a745 !important;
    background: #d4edda !important;
}

/* Schedule Section - Orange */
.event-section--schedule {
    background: #fff3cd !important;
    border: 2px solid #ffeaa7 !important;
}

.event-section--schedule:hover {
    border-color: #fd7e14 !important;
    background: #fff8e1 !important;
}

/* Manager Section - Purple */
.event-section--manager {
    background: #f3e8ff !important;
    border: 2px solid #ddd6fe !important;
}

.event-section--manager:hover {
    border-color: #8b5cf6 !important;
    background: #ede9fe !important;
}

/* Section titles */
.event-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
}

.event-section-title::before {
    font-size: 18px;
    margin-right: 0.5rem;
}

/* Section content */
.event-section-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Field styles */
.event-field {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 1.5rem;
}

.event-label {
    font-weight: 500;
    color: #6b7280;
    min-width: 100px;
    font-size: 0.875rem;
    flex-shrink: 0;
    padding-top: 0.125rem;
}

.event-value {
    color: #1f2937;
    font-size: 1rem;
    flex: 1;
    word-break: break-word;
}

/* Links */
.event-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.event-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Notes styling */
.event-notes {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 4px solid #3b82f6;
    font-style: italic;
    color: #6b7280;
    line-height: 1.5;
}

/* Address block */
.event-address-block {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 4px solid #f59e0b;
}

.event-address-block > div {
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.event-address-block > div:last-child {
    margin-bottom: 0;
}

.event-map-link {
    margin-top: 0.5rem;
}

.event-map-link a {
    color: #f59e0b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.event-map-link a:hover {
    color: #d97706;
    text-decoration: underline;
}

/* Status badge */
.event-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-status-badge--active {
    background: #dcfce7;
    color: #166534;
}

.event-status-badge--completed {
    background: #dbeafe;
    color: #1e40af;
}

.event-status-badge--time_off {
    background: #fef3c7;
    color: #92400e;
}

/* Manager actions */
.manager-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-unlink-manager {
    padding: 0.125rem 0.375rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-unlink-manager:hover {
    background: #dc2626;
}

/* =====================================================
   MODERN CARD DESIGN FOR EDIT EVENT MODAL
   ===================================================== */

/* Event Cards */
.swal2-container .event-modal-container .event-card,
.event-modal-container .event-card {
    background: white !important;
    border-radius: 15px !important;
    padding: 20px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 15px !important;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #50c878);
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* Card Headers */
.event-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.event-card .card-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.event-card .card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.event-card .card-content {
    position: relative;
    z-index: 1;
}

/* Form Elements */
.event-card .form-row {
    display: flex;
    gap: 15px;
}

.event-card .form-group {
    flex: 1;
    margin-bottom: 15px;
}

.event-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.event-card .event-input {
    width: 100% !important;
    padding: 12px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: white !important;
    height: auto !important;
}

.event-card .event-input:focus {
    outline: none !important;
    border-color: #4a90e2 !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1) !important;
    transform: translateY(-1px) !important;
}

.event-card textarea.event-input {
    min-height: 80px !important;
    resize: vertical !important;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-text {
    font-weight: 500;
    color: #2c3e50;
}

.importance-badge {
    background: #e74c3c;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: auto;
}

/* Reminder Interval Group */
.reminder-interval-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 0;
}

.btn-cancel, .btn-update {
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-cancel {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3) !important;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4) !important;
}

.btn-update {
    background: linear-gradient(135deg, #27ae60, #229954) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3) !important;
}

.btn-update:hover {
    background: linear-gradient(135deg, #229954, #1e8449) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4) !important;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive design */
@media (max-width: 640px) {
    .event-modal-container {
        padding: 0.5rem;
        gap: 10px;
    }
    
    .event-card {
        padding: 15px;
    }
    
    .event-card .card-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .event-card .card-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .event-card .card-title {
        font-size: 16px;
    }
    
    .event-card .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-cancel, .btn-update {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .event-section {
        padding: 0.75rem;
    }
    
    .event-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .event-label {
        min-width: auto;
        font-weight: 600;
        color: #1f2937;
    }
    
    .manager-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Dark mode support */
[data-theme="dark"] .event-section {
    background: #374151 !important;
    color: #f9fafb;
}

[data-theme="dark"] .event-section-title {
    color: #f9fafb;
}

[data-theme="dark"] .event-label {
    color: #d1d5db;
}

[data-theme="dark"] .event-value {
    color: #f9fafb;
}

[data-theme="dark"] .event-notes {
    background: #4b5563;
    color: #d1d5db;
}

[data-theme="dark"] .event-address-block {
    background: #4b5563;
}

[data-theme="dark"] .event-address-block > div {
    color: #f9fafb;
}

