/* Task Detail Modal Styles */

.task-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(4px);
}

.task-detail-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.task-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.task-detail-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(217, 168, 38, 0.1) 0%, rgba(217, 168, 38, 0.05) 100%);
    border-radius: 16px 16px 0 0;
}

.task-detail-title-section {
    flex: 1;
    margin-right: 16px;
}

.task-detail-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--h2-text-color, #2d3748);
    line-height: 1.3;
}

.task-detail-subtitle {
    margin: 8px 0 0 0;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.task-detail-close {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.task-detail-close:hover {
    background: white;
    color: #333;
    transform: scale(1.05);
}

/* Info Grid */
.task-detail-info {
    padding: 24px;
    background: rgba(247, 247, 247, 0.5);
}

.task-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.task-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-info-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

.spots-available {
    color: var(--header-link-color, #d9a826);
    font-weight: 600;
}

.spots-full {
    color: #e53e3e;
    font-weight: 600;
}

/* Sections */
.task-detail-section {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.task-detail-section:last-of-type {
    border-bottom: none;
}

.task-detail-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--h2-text-color, #2d3748);
}

.task-description {
    margin: 0;
    line-height: 1.6;
    color: #555;
    font-size: 1rem;
}

.task-requirements, .task-materials {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.task-requirements li, .task-materials li {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(217, 168, 38, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--header-link-color, #d9a826);
    font-size: 0.95rem;
    color: #333;
}

.task-requirements li:last-child, .task-materials li:last-child {
    margin-bottom: 0;
}

/* Contact Info */
.contact-info {
    background: rgba(247, 247, 247, 0.8);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-info p {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info a {
    color: var(--header-link-color, #d9a826);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Action Buttons */
.task-detail-actions {
    padding: 16px;
    background: rgba(247, 247, 247, 0.5);
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.btn-volunteer-primary {
    background: var(--header-link-color, #d9a826);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 120px;
    max-width: 180px;
}

.btn-volunteer-primary:hover {
    background: var(--button-hover-color, #c49023);
    box-shadow: 0 4px 12px rgba(217, 168, 38, 0.3);
}

.btn-volunteer-login {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 120px;
    max-width: 180px;
}

.btn-volunteer-login:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-volunteer-registered {
    background: #22c55e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 120px;
    max-width: 180px;
}

.btn-volunteer-registered:hover {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.login-required-message {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(243, 244, 246, 0.8);
    border: 2px solid rgba(209, 213, 219, 0.8);
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    justify-content: center;
    flex: 1;
    min-width: 120px;
    max-width: 180px;
}

.btn-volunteer-disabled {
    background: #e2e8f0;
    color: #a0aec0;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    min-width: 120px;
    max-width: 180px;
}

.btn-share, .btn-calendar {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #666;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-share:hover, .btn-calendar:hover {
    background: white;
    border-color: var(--header-link-color, #d9a826);
    color: var(--header-link-color, #d9a826);
}

/* Task Detail Error */
.task-detail-error {
    padding: 24px;
    text-align: center;
    color: #e53e3e;
    font-size: 1.1rem;
    background: #fed7d7;
    border-radius: 12px;
    margin: 24px;
}

/* Task Details Form Styling */
.form-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    background-color: #f8f9fa;
}

.form-section legend {
    padding: 0 10px;
    font-weight: bold;
    color: #333;
}

.form-section .form-group {
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .task-detail-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .task-detail-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .task-detail-title-section {
        margin-right: 0;
    }
    
    .task-detail-close {
        position: absolute;
        top: 16px;
        right: 16px;
    }
    
    .task-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .task-detail-section {
        padding: 20px;
    }
    
    .task-detail-actions {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-volunteer-primary, .btn-volunteer-disabled, .btn-volunteer-registered, .btn-volunteer-login {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .btn-share, .btn-calendar {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .task-detail-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .task-detail-header {
        border-radius: 0;
    }
    
    .task-detail-actions {
        border-radius: 0;
    }
}
