/* =============================================================================
   RFP Bid Projects Plugin — Stylesheet  v2.0
   Covers: list table view, project detail view, na-* card classes,
           registration form (rfp-* classes)
   ============================================================================= */

/* ── Shared container ─────────────────────────────────────────────────────── */
.rfp-container {
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

.rfp-loading {
    color: #777;
    font-style: italic;
    padding: 20px 0;
}

.rfp-error {
    color: #c0392b;
    padding: 12px;
    background: #fdf0ef;
    border-left: 4px solid #c0392b;
    border-radius: 3px;
}

.rfp-no-results {
    color: #666;
    font-style: italic;
    padding: 20px 0;
}

/* =============================================================================
   List view — responsive table
   ============================================================================= */

.rfp-list-view {
    overflow-x: auto;
}

.rfp-projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.rfp-projects-table thead {
    background: #316513;
    color: #fff;
}

.rfp-projects-table thead th,
.rfp-projects-table tr th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 0.88em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff !important;
}

.rfp-projects-table tbody tr {
    border-bottom: 1px solid #e6eaf0;
    transition: background 0.12s;
}

.rfp-projects-table tbody tr:hover {
    background: #f0f4fc;
}

.rfp-projects-table td {
    padding: 14px 16px;
    vertical-align: middle;
    color: #333;
}

.rfp-col-name {
    font-weight: 600;
}

.rfp-col-deadline {
    white-space: nowrap;
    color: #555;
}

.rfp-col-location {
    color: #555;
}

.rfp-col-actions {
    text-align: right;
    white-space: nowrap;
}

/* Small variant of the button used in the table */
.rfp-btn--sm {
    padding: 7px 16px;
    font-size: 0.85em;
}

/* Responsive: stack table as cards on small screens */
@media (max-width: 640px) {
    .rfp-projects-table thead {
        display: none;
    }

    .rfp-projects-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #dde3ec;
        border-radius: 6px;
        padding: 12px;
    }

    .rfp-projects-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 4px;
        border: none;
    }

    .rfp-projects-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #1a2e4a;
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .rfp-col-actions {
        justify-content: flex-end;
    }

    .rfp-col-actions::before {
        display: none;
    }
}

/* =============================================================================
   Detail view (na-* classes from the bare API response)
   ============================================================================= */

.rfp-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #316513;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}

.rfp-back-link:hover {
    text-decoration: underline;
}

.na-projects {
    box-sizing: border-box;
}

.na-project-card {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 24px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.na-project-name {
    margin: 0 0 12px;
    font-size: 1.4em;
    font-weight: 700;
    color: #1a2e4a;
}

.na-project-location {
    margin: 0 0 6px;
    font-size: 0.95em;
    font-weight: 600;
    color: #444;
}

.na-project-address {
    margin: 0 0 10px;
    font-size: 0.92em;
    color: #666;
}

.na-project-deadline {
    display: inline-block;
    margin: 0 0 14px;
    font-size: 0.95em;
    color: #fff !important;
    background: #c0392b;
    padding: 4px 12px;
    border-radius: 3px;
    font-weight: 600;
}

.na-project-notes,
.na-project-description {
    margin: 0 0 12px;
    font-size: 0.92em;
    color: #555;
}

.na-project-files {
    margin: 16px 0;
    padding: 14px 16px;
    background: #f7f9fc;
    border: 1px solid #e0e6f0;
    border-radius: 4px;
    font-size: 0.92em;
}

.na-project-files__label {
    display: block;
    margin-bottom: 8px;
    color: #1a2e4a;
    font-weight: 600;
}

.na-project-files__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.na-project-files__item {
    margin-bottom: 5px;
}

.na-project-files__link {
    color: #6a9d07;
    text-decoration: none;
}

.na-project-files__link:hover {
    text-decoration: underline;
}

.na-project-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.na-project-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 0.92em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.na-project-btn--register {
    background: #6a9d07;
    color: #fff;
}

.na-project-btn--register:hover {
    background: #4f7605;
    color: #fff;
}

.na-project-btn--login {
    background: #fff;
    color: #6a9d07;
    border: 2px solid #6a9d07;
}

.na-project-btn--login:hover {
    background: #6a9d07;
    color: #fff;
}

@media (max-width: 600px) {
    .na-project-card {
        padding: 16px;
    }

    .na-project-btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* =============================================================================
   Registration form (rfp-* classes)
   ============================================================================= */

#rfp-register-wrapper {
    padding: 10px 0;
}

.rfp-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.rfp-form-col {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
}

.rfp-form-col.rfp-full {
    flex-basis: 100%;
    flex-grow: 1;
}

.rfp-form-col.rfp-col-sm {
    flex: 0 1 120px;
}

.rfp-form-col label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #333;
}

.rfp-form-col small {
    margin-top: 4px;
    font-size: 0.78em;
    color: #888;
}

.rfp-form-col input[type="text"],
.rfp-form-col input[type="email"],
.rfp-form-col input[type="tel"],
.rfp-form-col input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    color: #333;
    background: #fff;
    transition: border-color 0.15s;
}

.rfp-form-col input:focus {
    outline: none;
    border-color: #6a9d07;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.15);
}

.rfp-required {
    color: #c0392b;
}

.rfp-btn {
    display: inline-block;
    background: #6a9d07;
    color: #fff;
    border: none;
    padding: 11px 32px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
    letter-spacing: 0.02em;
}

.rfp-btn:hover {
    background: #4f7605;
    color: #fff;
}

.rfp-btn:disabled {
    background: #9fbde8;
    cursor: not-allowed;
}

#rfp-register-response {
    margin-bottom: 14px;
    min-height: 0;
}

@media (max-width: 600px) {
    .rfp-form-col,
    .rfp-form-col.rfp-col-sm {
        flex: 1 1 100%;
    }
}


/* ── Project list wrapper ─────────────────────────────────────────────────── */
.na-projects {
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Individual project card ─────────────────────────────────────────────── */
.na-project-card {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.na-project-card:last-child {
    margin-bottom: 0;
}

/* ── Project name ─────────────────────────────────────────────────────────── */
.na-project-name {
    margin: 0 0 10px;
    font-size: 1.2em;
    font-weight: 700;
    color: #1a2e4a;
}

/* ── Deadline ─────────────────────────────────────────────────────────────── */
.na-project-deadline {
    margin: 0 0 10px;
    font-size: 0.95em;
}

/* ── Optional notes / description ────────────────────────────────────────── */
.na-project-notes,
.na-project-description {
    margin: 0 0 10px;
    font-size: 0.92em;
    color: #666;
    font-style: italic;
}

/* ── Public documents block ───────────────────────────────────────────────── */
.na-project-files {
    margin: 12px 0;
    font-size: 0.92em;
}

.na-project-files__label {
    display: block;
    margin-bottom: 6px;
    color: #333;
}

.na-project-files__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.na-project-files__item {
    margin-bottom: 4px;
}

.na-project-files__link {
    color: #6a9d07;
    text-decoration: none;
}

.na-project-files__link:hover {
    text-decoration: underline;
}

/* ── Action buttons ───────────────────────────────────────────────────────── */
.na-project-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.na-project-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.na-project-btn--register {
    background: #6a9d07;
    color: #fff;
}

.na-project-btn--register:hover {
    background: #4f7605;
    color: #fff;
}

.na-project-btn--login {
    background: #fff;
    color: #6a9d07;
    border: 2px solid #6a9d07;
}

.na-project-btn--login:hover {
    background: #6a9d07;
    color: #fff;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .na-project-card {
        padding: 16px;
    }

    .na-project-btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* =============================================================================
   Registration form (rfp-* classes)
   ============================================================================= */

.rfp-container {
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

.rfp-loading {
    color: #777;
    font-style: italic;
    padding: 20px 0;
}

.rfp-error {
    color: #c0392b;
    padding: 12px;
    background: #fdf0ef;
    border-left: 4px solid #c0392b;
    border-radius: 3px;
}

#rfp-register-wrapper {
    padding: 10px 0;
}

.rfp-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.rfp-form-col {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
}

.rfp-form-col.rfp-full {
    flex-basis: 100%;
    flex-grow: 1;
}

.rfp-form-col.rfp-col-sm {
    flex: 0 1 120px;
}

.rfp-form-col label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #333;
}

.rfp-form-col small {
    margin-top: 4px;
    font-size: 0.78em;
    color: #888;
}

.rfp-form-col input[type="text"],
.rfp-form-col input[type="email"],
.rfp-form-col input[type="tel"],
.rfp-form-col input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    color: #333;
    background: #fff;
    transition: border-color 0.15s;
}

.rfp-form-col input:focus {
    outline: none;
    border-color: #6a9d07;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.15);
}

.rfp-required {
    color: #c0392b;
}

.rfp-btn {
    display: inline-block;
    background: #6a9d07;
    color: #fff;
    border: none;
    padding: 11px 32px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.02em;
}

.rfp-btn:hover {
    background: #4f7605;
}

.rfp-btn:disabled {
    background: #9fbde8;
    cursor: not-allowed;
}

#rfp-register-response {
    margin-bottom: 14px;
    min-height: 0;
}

@media (max-width: 600px) {
    .rfp-form-col,
    .rfp-form-col.rfp-col-sm {
        flex: 1 1 100%;
    }
}

/* ── Shared container ─────────────────────────────────────────────────────── */
.rfp-container {
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

.rfp-loading {
    color: #777;
    font-style: italic;
    padding: 20px 0;
}

.rfp-error {
    color: #c0392b;
    padding: 12px;
    background: #fdf0ef;
    border-left: 4px solid #c0392b;
    border-radius: 3px;
}

/* ── Registration form ────────────────────────────────────────────────────── */
#rfp-register-wrapper {
    padding: 10px 0;
}

.rfp-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

/* Default column: grow equally */
.rfp-form-col {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
}

/* Full-width column */
.rfp-form-col.rfp-full {
    flex-basis: 100%;
    flex-grow: 1;
}

/* Narrow column (State, Zip) */
.rfp-form-col.rfp-col-sm {
    flex: 0 1 120px;
}

.rfp-form-col label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #333;
}

.rfp-form-col small {
    margin-top: 4px;
    font-size: 0.78em;
    color: #888;
}

.rfp-form-col input[type="text"],
.rfp-form-col input[type="email"],
.rfp-form-col input[type="tel"],
.rfp-form-col input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    color: #333;
    background: #fff;
    transition: border-color 0.15s;
}

.rfp-form-col input:focus {
    outline: none;
    border-color: #6a9d07;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.15);
}

.rfp-required {
    color: #c0392b;
}

/* ── Submit button ────────────────────────────────────────────────────────── */
.rfp-btn {
    display: inline-block;
    background: #6a9d07;
    color: #fff;
    border: none;
    padding: 11px 32px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.02em;
}

.rfp-btn:hover {
    background: #4f7605;
}

.rfp-btn:disabled {
    background: #9fbde8;
    cursor: not-allowed;
}

/* ── Response message area ────────────────────────────────────────────────── */
#rfp-register-response {
    margin-bottom: 14px;
    min-height: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
    .rfp-form-col,
    .rfp-form-col.rfp-col-sm {
        flex: 1 1 100%;
    }
}
