/* VAPMA Manager UI styles
 * Standalone styling for front-end manager review screens.
 */

.vapma-manager-review {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
                 Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #222222;
}

/* Headings */
.vapma-manager-review h1 {
    font-size: 22px;
    margin: 0 0 1.5rem;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 0.75rem;
}

.vapma-manager-review h2 {
    font-size: 18px;
    margin: 2rem 0 0.75rem;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 0.4rem;
}

.vapma-manager-review p {
    margin: 0 0 0.75rem;
}

.vapma-manager-review strong {
    font-weight: 600;
}

/* Meta header (Application ID, Submitted etc.) */
.vapma-manager-review-header {
    margin-bottom: 1.5rem;
}

.vapma-manager-review-status {
    margin: 0.25rem 0 0.75rem;
    font-weight: 600;
}

.vapma-manager-review-meta {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.vapma-manager-review-meta > div {
    margin-right: 2rem;
    margin-bottom: 0.25rem;
}

.vapma-manager-review-meta dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0;
    color: #666;
}

.vapma-manager-review-meta dd {
    margin: 0;
}

/* Applicant details table */
.vapma-manager-review table.vapma-review-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 1.5rem;
}

.vapma-manager-review table.vapma-review-table th,
.vapma-manager-review table.vapma-review-table td {
    padding: 0.25rem 0.5rem 0.25rem 0;
    vertical-align: top;
    border: none;
}

.vapma-manager-review table.vapma-review-table th {
    width: 220px;
    font-weight: 600;
    color: #444444;
    text-align: left;
}

/* Uploaded content list */
.vapma-manager-review ul.vapma-review-uploads {
    list-style: disc;
    margin: 0 0 1.5rem 1.25rem;
    padding: 0;
}

.vapma-manager-review ul.vapma-review-uploads li.vapma-review-upload {
    margin-bottom: 1.5rem;
}

.vapma-upload-meta {
    margin-bottom: 0.5rem;
}

/* Internal storage path text */
.vapma-manager-review code {
    font-size: 12px;
    background: #f8f8f8;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Media preview wrapper + actual previews */
.vapma-upload-preview {
    margin-top: 0.25rem;
}

.vapma-upload-thumb,
.vapma-upload-video {
    display: block;
    max-width: 100%;
    max-height: 320px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    background: #000;
    object-fit: contain;
}

.vapma-upload-actions {
    margin: 0.25rem 0 0;
    font-size: 13px;
}

/* Small helper caption text */
.vapma-manager-review small {
    display: inline-block;
    margin-top: 0.25rem;
    color: #666666;
}

/* Sections */
.vapma-manager-section {
    margin-top: 2rem;
}

/* Manager decision form */
.vapma-manager-decision-block {
    padding-top: 1rem;
    border-top: 1px solid #e1e1e1;
}

.vapma-manager-decision-options {
    border: none;
    margin: 0 0 1rem;
    padding: 0;
}

.vapma-manager-decision-options legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.vapma-manager-decision-options label {
    display: block;
    margin-bottom: 0.25rem;
}

.vapma-manager-decision-options input[type="radio"] {
    margin-right: 0.35rem;
}

.vapma-manager-field {
    margin-bottom: 1rem;
}

.vapma-manager-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.vapma-manager-field input[type="text"],
.vapma-manager-field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 3px;
    border: 1px solid #cccccc;
    font-size: 13px;
}

.vapma-manager-field textarea {
    min-height: 120px;
    resize: vertical;
}

.vapma-manager-footer-note {
    font-size: 12px;
    color: #666666;
    margin-top: 0.5rem;
}

.vapma-manager-review button.button.button-primary {
    margin-top: 0.75rem;
}

/* Error view */
.vapma-manager-review-error h1 {
    font-size: 22px;
}

.vapma-manager-review-error p {
    font-size: 14px;
}

/* Simple success notice when a review has been saved */
.vapma-manager-notice {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 3px;
    font-size: 13px;
}

.vapma-manager-notice-success {
    background: #f0f7ec;
    border: 1px solid #76a365;
    color: #234522;
}

/* ---------------------------------------------------------
 * Divi color bridge (uses Divi primary if available)
 * ------------------------------------------------------ */

:root {
    /* If Divi defines a primary color variable, use it.
       Fallback to a sane accent if not. */
    --vapma-accent: var(--et_pb_primary_color, var(--et_builder_primary_color, #d12627));
}

/* ---------------------------------------------------------
 * Manager Dashboard layout (outer container only)
 * ------------------------------------------------------ */

.vapma-manager-dashboard {
    max-width: 1120px;
    margin: 2rem auto;
    padding: 0 0 2.5rem;
    box-sizing: border-box;
}

.vapma-manager-heading {
    margin: 0 0 0.25rem;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #111827; /* matches main site headings */
}

.vapma-manager-subheading {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    color: rgba(17, 24, 39, 0.7);
}

/* ---------------------------------------------------------
 * Summary tiles (Part-B style, dark navy on red background)
 * ------------------------------------------------------ */

.vapma-dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}

.vapma-dashboard-tile {
    position: relative;
    background: #020617; /* deep navy, same vibe as Part B */
    border-radius: 14px;
    padding: 1rem 1.1rem;
    overflow: hidden;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    color: #f9fafb;
}

/* subtle accent line at the top using Divi primary if present */
.vapma-dashboard-tile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--et_pb_primary_color, var(--et_builder_primary_color, #ff3b3b));
    opacity: 0.9;
}

.vapma-dashboard-label,
.vapma-dashboard-value,
.vapma-dashboard-subtitle {
    position: relative;
    z-index: 1;
}

.vapma-dashboard-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #c7d2fe; /* soft indigo, same family as Part-B headings */
    margin-bottom: 0.25rem;
}

.vapma-dashboard-value {
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    color: #f9fafb;
}

.vapma-dashboard-subtitle {
    font-size: 0.78rem;
    color: #e5e7eb;
    max-width: 22rem;
}

/* you can still target these if you ever want per-status tweaks:
   .vapma-dashboard-tile--unconfirmed, --in_review, --approved, etc.
*/

/* ---------------------------------------------------------
 * Section cards & tables (leave these as they are if they
 * already look good with the theme)
 * ------------------------------------------------------ */

.vapma-manager-section {
    margin-top: 1.25rem;
}

.vapma-manager-section-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1.35rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
}

.vapma-manager-section h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------------------------------------------------------
 * Shared table styling for dashboard + queue
 * ------------------------------------------------------ */

.vapma-manager-table,
.vapma-review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.vapma-manager-table thead,
.vapma-review-table thead {
    background: #f9fafb;
}

.vapma-manager-table th,
.vapma-manager-table td,
.vapma-review-table th,
.vapma-review-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.vapma-manager-table th,
.vapma-review-table th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.vapma-manager-table tbody tr:nth-child(even),
.vapma-review-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.vapma-manager-table tbody tr:hover,
.vapma-review-table tbody tr:hover {
    background-color: #eef2ff;
}

.vapma-manager-table a,
.vapma-review-table a {
    color: var(--vapma-accent);
    text-decoration: none;
    font-weight: 500;
}

.vapma-manager-table a:hover,
.vapma-review-table a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
 * Status chips / pills (match PHP modifiers)
 * ------------------------------------------------------ */

.vapma-manager-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: color-mix(in srgb, #e5e7eb 70%, var(--vapma-accent) 10%);
    color: #374151;
}

/* Unconfirmed = amber */
.vapma-manager-status-pill--unconfirmed {
    border-color: rgba(245, 158, 11, 0.25);
    background: color-mix(in srgb, #fffbeb 70%, #f59e0b 25%);
    color: #92400e;
}

/* In review = primary accent */
.vapma-manager-status-pill--in-review {
    border-color: color-mix(in srgb, var(--vapma-accent) 65%, #c7d2fe);
    background: color-mix(in srgb, var(--vapma-accent) 35%, #eef2ff 65%);
    color: #111827;
}

/* Approved = green */
.vapma-manager-status-pill--approved {
    border-color: rgba(34, 197, 94, 0.3);
    background: color-mix(in srgb, #ecfdf5 70%, #22c55e 25%);
    color: #166534;
}

/* Rejected = red */
.vapma-manager-status-pill--rejected {
    border-color: rgba(239, 68, 68, 0.3);
    background: color-mix(in srgb, #fef2f2 70%, #ef4444 25%);
    color: #991b1b;
}

/* Expired = neutral */
.vapma-manager-status-pill--expired {
    border-color: rgba(107, 114, 128, 0.32);
    background: color-mix(in srgb, #f9fafb 70%, #9ca3af 25%);
    color: #374151;
}

/* ---------------------------------------------------------
 * Responsive tweaks
 * ------------------------------------------------------ */

@media (max-width: 768px) {
    .vapma-manager-dashboard {
        margin: 1.5rem 0.75rem;
        padding-bottom: 1.5rem;
    }

    .vapma-manager-heading {
        font-size: 1.4rem;
    }

    .vapma-manager-section-card {
        padding: 1rem 0.9rem 1.1rem;
    }

    .vapma-manager-table th,
    .vapma-manager-table td,
    .vapma-review-table th,
    .vapma-review-table td {
        padding: 0.45rem 0.5rem;
    }
}