/* Quick Tasks Panel Styles */

.quick-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Form feedback styles */
.form-feedback {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    animation: fadeInDown 0.4s ease-out;
}

.form-feedback.success {
    background-color: rgba(40, 167, 69, 0.15);
    border-left: 4px solid #28a745;
    color: #1e7e34;
}

.form-feedback.error {
    background-color: rgba(220, 53, 69, 0.15);
    border-left: 4px solid #dc3545;
    color: #bd2130;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Light red quick task button with subtle shimmer */
.quick-task-btn {
    background: #ff6f6f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(255, 111, 111, 0.12);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    z-index: 1;
}

.quick-task-btn:hover, .quick-task-btn:focus {
    box-shadow: 0 4px 16px rgba(255, 111, 111, 0.22);
    transform: translateY(-2px) scale(1.03);
    outline: none;
}

.quick-task-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 220%; height: 100%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.18) 40%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.18) 60%, rgba(255,255,255,0) 100%);
    /* SVG shimmer as a background image for extra subtlety */
    /* background-image: url('data:image/svg+xml;utf8,<svg ...>'); */
    animation: shimmer-move 2.2s linear infinite;
}

@keyframes shimmer-move {
    0% { left: -60%; }
    100% { left: 100%; }
}

.quick-task-btn {
    /* Ensure text and icons are above the shimmer */
    position: relative;
    z-index: 3;
}

/* Quick Task Animations */
#quickTasksContainer {
    transition: all 0.4s ease-in-out;
    transform: translateX(0);
    opacity: 1;
    position: relative;
}

#quickTasksContainer h2 {
    color: #4a5568;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

#quickTasksContainer h2:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c 0%, #3498db 100%);
    border-radius: 2px;
}

#quickTasksContainer.slide-out {
    transform: translateX(-100%);
    opacity: 0;
}

#quickTaskContent {
    transition: all 0.5s cubic-bezier(.77,0,.18,1);
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    display: none;
    padding: 24px 0 0 0;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255,255,255,0.98);
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(231, 76, 60, 0.18), 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    z-index: 20;
}

#quickTaskContent.slide-in {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

#quickTaskContent.slide-out {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    pointer-events: none;
}

/* Ensure modal container is properly positioned */
#quickTaskContent {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 2000; /* Ensure higher than overlay */
}

/* Overlay for modal effect */
.quick-task-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(231, 76, 60, 0.10);
    backdrop-filter: blur(4px);
    z-index: 2147483646; /* just below modal */
    transition: opacity 0.4s;
    opacity: 1;
    pointer-events: auto; /* Allow clicks to close modal */
}

.quick-task-overlay.hide {    opacity: 0;
    pointer-events: none;
}

.task-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(229, 62, 62, 0.2);
}

.btn-cancel:hover {
    background: rgba(229, 62, 62, 0.2);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.15);
}

.btn-submit {
    background: linear-gradient(135deg, #4c1d95 0%, #7e22ce 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.btn-submit:hover {
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

#quickTaskContent.slide-in {
    transform: translateX(0);
    opacity: 1;
    display: block !important;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

#taskTitle {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

/* Wellbeing specific styles */
.wellbeing-card {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border-left: 4px solid #28a745;
}

.wellbeing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.wellbeing-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e8f5e8;
    transition: all 0.3s ease;
}

.wellbeing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.wellbeing-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-good {
    background: #d4edda;
    color: #155724;
}

.status-attention {
    background: #fff3cd;
    color: #856404;
}

.status-urgent {
    background: #f8d7da;
    color: #721c24;
}

/* Staff utilities styles */
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.utility-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
}

.utility-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.utility-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.utility-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.utility-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Coming soon placeholder */
.coming-soon {
    text-align: center;
    padding: 40px;
    color: #666;
}

.coming-soon .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.coming-soon h3 {
    margin-bottom: 15px;
    color: #333;
}

.coming-soon ul {
    text-align: left;
    max-width: 300px;
    margin: 20px auto;
    padding: 0;
    list-style: none;
}

.coming-soon li {
    padding: 5px 0;
    position: relative;
    padding-left: 20px;
}

.coming-soon li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quick-tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .task-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .wellbeing-grid,
    .utility-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility improvements */
.quick-task-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

@media (prefers-reduced-motion: reduce) {
    #quickTasksContainer,
    #quickTaskContent,
    .quick-task-btn,
    .wellbeing-item,
    .utility-item {
        transition: none;
    }
}

/* --- MODAL & OVERLAY ABSOLUTE OVERRIDES --- */
.quick-task-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(102,126,234,0.10);
    backdrop-filter: blur(4px);
    z-index: 1000;
    transition: opacity 0.4s;
    opacity: 1;
    pointer-events: auto;
}

#quickTaskContent.modal-fixed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1010;
    max-width: 480px;
    width: 95vw;
    min-width: 320px;
    box-shadow: 0 16px 48px rgba(102,126,234,0.22), 0 2px 8px rgba(0,0,0,0.12);
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px 24px 24px;
    display: block;
    opacity: 1;
    animation: modalPopIn 0.4s cubic-bezier(.77,0,.18,1);
    pointer-events: auto !important;
}
