/* Employee Events Manager Frontend Styles */

.eem-frontend-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Section */
.eem-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #eee 0%, #ccc 100%);
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.eem-title {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.eem-icon {
    font-size: 1.2em;
    margin-right: 15px;
    vertical-align: middle;
}

.eem-description {
    font-size: 1.1em;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Container */
.eem-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Controls Section */
.eem-controls {
    background: #f8f9fa;
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
}

.eem-search-filter {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.eem-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.eem-search-input:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(153, 153, 153, 0.1);
}

.eem-filter-select {
    min-width: 150px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.eem-filter-select:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(153, 153, 153, 0.1);
}

/* Buttons */
.eem-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.eem-button-primary {
    background: linear-gradient(135deg, #eee 0%, #ccc 100%);
    color: #333;
}

.eem-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 153, 153, 0.3);
}

.eem-button-secondary {
    background: #6c757d;
    color: white;
}

.eem-button-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

.eem-button-small {
    padding: 8px 16px;
    font-size: 14px;
    min-width: auto;
}

.eem-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Events Table */
.eem-events-table-container {
    overflow-x: auto;
}

.eem-events-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.eem-events-table th {
    background: #f8f9fa;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eem-events-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.eem-events-table tr:hover {
    background: #f8f9fa;
    transition: background 0.3s ease;
}

.eem-events-table .eem-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
}

.eem-events-table .eem-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Loading Spinner */
.eem-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: eem-spin 1s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

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

/* Pagination */
.eem-pagination {
    background: #f8f9fa;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid #e9ecef;
}

.eem-pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.eem-pagination-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.eem-current-page {
    display: inline-block;
    padding: 8px 12px;
    background: #999;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.eem-page-btn {
    background: white;
    color: #999;
    border: 2px solid #e9ecef;
}

.eem-page-btn:hover {
    background: #999;
    color: white;
    border-color: #999;
}

/* Modals */
.eem-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.eem-modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: eem-modal-fade-in 0.3s ease-out;
}

@keyframes eem-modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.eem-modal-header {
    background: linear-gradient(135deg, #eee 0%, #ccc 100%);
    padding: 25px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eem-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.eem-modal-close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.2);
}

.eem-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.eem-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Bookings Table */
.eem-bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.eem-bookings-table th {
    background: #f8f9fa;
    padding: 14px 10px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eem-bookings-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.eem-bookings-table .eem-no-bookings {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Status Indicators */
.eem-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.eem-status-0 {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.eem-status-1 {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.eem-status-2 {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.eem-status-3 {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.eem-status-4 {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b3d9ff;
}

.eem-status-5 {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Modal Actions */
.eem-modal-actions {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.eem-status-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    margin-bottom: 20px;
}

.eem-status-select:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(153, 153, 153, 0.1);
}

/* Loading States */
.eem-bookings-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.eem-bookings-content {
    margin-top: 20px;
}

/* Notices */
.eem-notice {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid;
    animation: eem-notice-slide-in 0.3s ease-out;
}

.eem-notice-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.eem-notice-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

@keyframes eem-notice-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Access Denied */
.eem-access-denied {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    color: #6c757d;
}

.eem-access-denied h3 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eem-title {
        font-size: 2em;
    }
    
    .eem-search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .eem-search-input,
    .eem-filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .eem-pagination {
        flex-direction: column;
        text-align: center;
    }
    
    .eem-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .eem-events-table {
        font-size: 14px;
    }
    
    .eem-events-table th,
    .eem-events-table td {
        padding: 12px 8px;
    }
    
    .eem-button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .eem-modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .eem-header {
        padding: 20px 15px;
    }
    
    .eem-title {
        font-size: 1.8em;
    }
    
    .eem-controls {
        padding: 20px 15px;
    }
    
    .eem-modal-body {
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    .eem-controls,
    .eem-pagination,
    .eem-modal {
        display: none !important;
    }
    
    .eem-events-table {
        border: 1px solid #000;
    }
    
    .eem-events-table th,
    .eem-events-table td {
        border: 1px solid #000;
    }
    
    .eem-frontend-container {
        max-width: none;
        margin: 0;
    }
}

/* Accessibility */
.eem-modal:focus {
    outline: none;
}

.eem-modal-content:focus {
    outline: 2px solid #999;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .eem-button {
        border: 2px solid currentColor;
    }
    
    .eem-events-table th,
    .eem-events-table td {
        border: 1px solid currentColor;
    }
}

/* Add Booking Modal Styles */
.eem-modal-large {
    max-width: 1000px;
    width: 95%;
}

.eem-expert-search-section {
    margin-bottom: 25px;
}

.eem-experts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
    min-height: 400px;
}

.eem-experts-column,
.eem-selected-column {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.eem-experts-column h3,
.eem-selected-column h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eem-experts-list {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    padding: 10px;
}

.eem-selected-experts {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    padding: 10px;
}

.eem-expert-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.eem-expert-item:last-child {
    border-bottom: none;
}

.eem-expert-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.eem-expert-checkbox {
    margin-right: 10px;
    transform: scale(1.1);
}

.eem-expert-name {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.eem-expert-email {
    color: #6c757d;
    font-size: 13px;
}

.eem-selected-expert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    font-size: 14px;
}

.eem-selected-expert:last-child {
    margin-bottom: 0;
}

.eem-selected-expert .eem-expert-name {
    font-weight: 600;
    color: #1976d2;
    margin-right: 8px;
}

.eem-selected-expert .eem-expert-email {
    color: #666;
    font-size: 13px;
    flex: 1;
}

.eem-remove-expert {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.eem-remove-expert:hover {
    background: #c82333;
    transform: scale(1.1);
}

.eem-no-experts,
.eem-no-selection {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

.eem-add-booking-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.eem-add-booking-content {
    margin-top: 20px;
}

/* Responsive adjustments for Add Booking Modal */
@media (max-width: 768px) {
    .eem-experts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .eem-modal-large {
        width: 98%;
        margin: 2% auto;
    }
    
    .eem-experts-list,
    .eem-selected-experts {
        max-height: 250px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .eem-button,
    .eem-modal-content,
    .eem-notice,
    .eem-remove-expert {
        transition: none;
        animation: none;
    }
}
