/**
 * FOIA Request Manager Styles
 * 
 * @package FOIA_Request_Manager
 * @since 1.1.0
 */

/* Reset & Base */
.foia-dashboard,
.foia-detail,
.foia-login-form,
.foia-register-form,
#foia-pdf-form {
    font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Focus Styles for ADA Compliance */
.foia-dashboard a:focus,
.foia-dashboard button:focus,
.foia-dashboard input:focus,
.foia-dashboard select:focus,
.foia-dashboard textarea:focus,
.foia-detail a:focus,
.foia-detail button:focus,
.foia-detail input:focus,
.foia-detail select:focus,
.foia-detail textarea:focus,
#foia-pdf-form a:focus,
#foia-pdf-form button:focus,
#foia-pdf-form input:focus,
#foia-pdf-form select:focus,
#foia-pdf-form textarea:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* Skip Link */
.foia-skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.foia-skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    background: #005fcc;
    color: #fff;
    padding: 10px 20px;
    z-index: 100000;
    border-radius: 4px;
    font-weight: bold;
}

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Messages */
.foia-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 16px;
}

.foia-message p {
    margin: 0;
}

.foia-message ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.foia-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.foia-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.foia-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.foia-info {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

/* Status Badges */
.foia-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.foia-status-submitted {
    background-color: #fef3c7;
    color: #92400e;
}

.foia-status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.foia-status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.foia-status-denied {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Buttons */
.foia-btn,
.foia-dashboard a.button,
.foia-detail button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #005fcc;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.foia-btn:hover,
.foia-dashboard a.button:hover,
.foia-detail button:hover {
    background-color: #004499;
    color: #fff;
}

.foia-btn-secondary {
    background-color: #6b7280;
}

.foia-btn-secondary:hover {
    background-color: #4b5563;
}

.foia-btn-danger {
    background-color: #dc2626;
}

.foia-btn-danger:hover {
    background-color: #b91c1c;
}

/* Form Elements */
.foia-dashboard input[type="text"],
.foia-dashboard input[type="email"],
.foia-dashboard input[type="date"],
.foia-dashboard input[type="number"],
.foia-dashboard select,
.foia-dashboard textarea,
.foia-detail input[type="text"],
.foia-detail input[type="email"],
.foia-detail input[type="date"],
.foia-detail input[type="number"],
.foia-detail select,
.foia-detail textarea {
    padding: 10px 12px;
    border: 2px solid #333;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.foia-dashboard input:hover,
.foia-dashboard select:hover,
.foia-dashboard textarea:hover,
.foia-detail input:hover,
.foia-detail select:hover,
.foia-detail textarea:hover {
    border-color: #005fcc;
}

/* Tables */
.foia-dashboard table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.foia-dashboard table th,
.foia-dashboard table td {
    padding: 12px 10px;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.foia-dashboard table th {
    background-color: #1f2937;
    color: #fff;
    font-weight: 600;
}

.foia-dashboard table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.foia-dashboard table tbody tr:hover {
    background-color: #e0f2fe;
}

/* Pagination */
.foia-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.foia-pagination a,
.foia-pagination span {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #374151;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.foia-pagination a:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.foia-pagination .current {
    background-color: #005fcc;
    color: #fff;
    border-color: #005fcc;
}

/* Notes Section */
.notes-section {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.notes-section .note {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notes-section .note:last-child {
    margin-bottom: 0;
}

.notes-section .note.staff {
    border-left: 4px solid #1e40af;
    background-color: #eff6ff;
}

.notes-section .note.requester {
    border-left: 4px solid #d97706;
    background-color: #fffbeb;
}

.notes-section .note p {
    margin: 0 0 5px;
}

.notes-section .note p:last-child {
    margin-bottom: 0;
}

/* Add Note Section */
.add-note {
    margin-top: 20px;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
}

.add-note h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #374151;
}

.add-note textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.add-note button {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .foia-dashboard table {
        font-size: 14px;
    }

    .foia-dashboard table th,
    .foia-dashboard table td {
        padding: 8px 6px;
    }

    .foia-pagination {
        gap: 3px;
    }

    .foia-pagination a,
    .foia-pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .foia-status,
    .foia-message {
        border-width: 2px;
    }

    .foia-dashboard table th,
    .foia-dashboard table td {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .foia-btn,
    .foia-dashboard a.button,
    .foia-detail button,
    .foia-dashboard input,
    .foia-dashboard select,
    .foia-dashboard textarea,
    .foia-pagination a {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .foia-dashboard,
    .foia-detail {
        border: none;
        box-shadow: none;
    }

    .add-note,
    .foia-pagination,
    .foia-filters,
    button,
    .button {
        display: none !important;
    }
}
