/* ===== Request Details Modal — Modern Redesign ===== */

.request-details-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    overflow-y: auto;
}
.request-details-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* --- Card shell --- */
.request-details-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
}

/* --- Header --- */
.request-details-header {
    padding: 18px 24px;
    background: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
    border-radius: 14px 14px 0 0;
}
.request-details-header h2 {
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.request-details-header .close-modal {
    color: #94a3b8 !important;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.request-details-header .close-modal:hover {
    color: #fff !important;
}

/* --- Body --- */
.request-details-body {
    padding: 24px;
}

/* --- Meta row (Posted + Urgency) --- */
.details-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.details-posted {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.urgency-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
}
.urgency-tag.urgent {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.urgency-tag.scheduled {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* --- Category badge --- */
.details-category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 12px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    margin-bottom: 18px;
}

/* --- Section groups --- */
.details-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.details-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* --- Detail rows --- */
.detail-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}
.detail-item:last-child {
    margin-bottom: 0;
}
.detail-label {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
    min-width: 130px;
    flex-shrink: 0;
    margin-right: 8px;
    margin-bottom: 0;
}
.detail-value,
.detail-value * {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline !important;
    font-size: 14px !important;
    color: #1e293b !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

/* --- Requester row --- */
.details-requester {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}
.details-requester strong {
    color: #1e293b;
    font-weight: 600;
}

/* --- Remarks textarea --- */
.detail-remarks textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 12px 14px;
    box-sizing: border-box;
    resize: vertical;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #1e293b;
}
.detail-remarks textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.detail-remarks textarea::placeholder {
    color: #94a3b8;
    font-size: 14px;
    opacity: 1;
}

/* --- Helper / Contact / Rejection sections --- */
.helper-details-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 14px;
}
.helper-details-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.contact-section {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-left: 4px solid #16a34a !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    margin: 14px 0 !important;
}
.contact-section h5 {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #16a34a !important;
    margin: 0 0 10px 0 !important;
}
.rejection-section {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-left: 4px solid #dc2626 !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    margin-top: 14px !important;
}
.rejection-section h5 {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #dc2626 !important;
    margin: 0 0 10px 0 !important;
}

/* --- Footer --- */
.request-details-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: #fff;
    border-radius: 0 0 14px 14px;
}

/* --- Action buttons --- */
.btn-accept-request,
.detail-actions .btn-accept,
.detail-actions .btn-confirm {
    padding: 11px 24px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: 'Inter', -apple-system, sans-serif;
}
.btn-accept-request:hover,
.detail-actions .btn-accept:hover,
.detail-actions .btn-confirm:hover {
    background: #334155;
    transform: translateY(-1px);
}

.btn-close-details {
    padding: 11px 24px;
    background: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
}
.btn-close-details:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Chat button override */
#chatWithUserBtn {
    background: #1e293b !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: background 0.2s !important;
}
#chatWithUserBtn:hover {
    background: #334155 !important;
}

/* --- Responsive --- */
@media (max-width: 540px) {
    .request-details-content {
        max-width: 100%;
        border-radius: 12px;
    }
    .request-details-header {
        padding: 14px 18px;
        border-radius: 12px 12px 0 0;
    }
    .request-details-body {
        padding: 18px;
    }
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-label {
        min-width: unset;
        margin-bottom: 2px;
    }
    .details-section {
        padding: 14px;
    }
}

/* To Do Section */
/* Center the To Do section and make the green line shorter and more transparent */
.todo-section {
    padding: 20px 0 40px 0;
    background-color: transparent;
    border-top: 3px solid rgba(45, 80, 22, 0.18);
    max-width: 1000px;
    margin: 40px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* Center the To Do title */
.todo-section h2 {
    color: #2d5016;
    font-size: 22px;
    margin-bottom: 28px;
    text-align: left;
    padding-left: 0;
    margin-left: 24px;
}

/* Center the grid and cards */
.todo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start;
    align-items: flex-start;
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
}

/* Make the category name slightly smaller and uppercase */
.post-category-name {
    font-size: 0.85rem;
    font-weight: inherit;
    letter-spacing: inherit;
    color: inherit;
    text-transform: uppercase;
    margin-bottom: 2px;
}
