/* ==========================================================================
   RFP360 Opportunities Widget — WordPress Plugin Stylesheet
   ========================================================================== */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Auto-refresh status bar ---------- */
.rfp360-refresh-bar {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 10px;
    min-height: 20px;
    transition: background 0.4s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.rfp360-refresh-bar.rfp360-bar-highlight {
    background: #f0fdf4;
    color: #16a34a;
}

/* NEW badge in the refresh bar */
.rfp360-new-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 20px;
    margin-left: 4px;
    animation: rfp360-pulse 0.6s ease 3;
}

/* NEW flash on cards */
.rfp360-new-flash {
    font-size: 0.7rem;
    font-weight: 700;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    border-radius: 4px;
    padding: 1px 7px;
    letter-spacing: 0.04em;
    animation: rfp360-pulse 0.5s ease 4;
}

/* Card header row (type badge + NEW badge side by side) */
.rfp360-card-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Highlight border for new cards */
.rfp360-card-new {
    border-color: #86efac !important;
    box-shadow: 0 0 0 2px #dcfce7;
}

@keyframes rfp360-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

#rfp360-opportunities-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    color: #1e293b;
}

/* ---------- Section title (single-tab mode) ---------- */
.rfp360-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #1e293b;
}

/* ---------- Tabs ---------- */
.rfp360-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.rfp360-tab-btn {
    background: none;
    border: none;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    font-family: inherit;
}

.rfp360-tab-btn:hover {
    color: #3b5bdb;
    background: #eff3ff;
}

.rfp360-tab-btn.rfp360-tab-active {
    color: #3b5bdb;
    border-bottom-color: #3b5bdb;
    background: #f0f4ff;
}

/* ---------- Panels ---------- */
.rfp360-panel {
    display: none;
}

.rfp360-panel-active {
    display: block;
}

/* ---------- Filters ---------- */
.rfp360-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.4rem;
}

.rfp360-filter-input,
.rfp360-filter-select {
    flex: 1 1 180px;
    min-width: 150px;
    padding: 9px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #334155;
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
}

.rfp360-filter-input:focus,
.rfp360-filter-select:focus {
    border-color: #3b5bdb;
    box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.1);
}

/* ---------- Results grid ---------- */
.rfp360-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    min-height: 120px;
}

/* ---------- Loading / Error states ---------- */
.rfp360-loading,
.rfp360-empty,
.rfp360-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.rfp360-loading::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b5bdb;
    border-radius: 50%;
    animation: rfp360-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes rfp360-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Cards ---------- */
.rfp360-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.rfp360-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #a5b4f8;
}

.rfp360-card-type {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.rfp360-card-type.sled {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.rfp360-card-type.federal {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.rfp360-card-title {
    font-size: 0.97rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rfp360-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: #64748b;
}

.rfp360-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rfp360-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.rfp360-due-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.rfp360-due-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.rfp360-view-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    background: #3b5bdb;
    color: #fff !important;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.18s;
    font-family: inherit;
}

.rfp360-view-btn:hover {
    background: #2f4ac4;
}

/* ---------- Pagination ---------- */
.rfp360-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.8rem;
    flex-wrap: wrap;
}

.rfp360-page-btn {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}

.rfp360-page-btn:hover:not(:disabled) {
    border-color: #3b5bdb;
    color: #3b5bdb;
}

.rfp360-page-btn.active {
    background: #3b5bdb;
    color: #fff;
    border-color: #3b5bdb;
}

.rfp360-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rfp360-page-info {
    font-size: 0.82rem;
    color: #94a3b8;
}

/* ---------- Modal ---------- */
.rfp360-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.rfp360-modal-overlay.rfp360-open {
    display: flex;
}

.rfp360-modal-box {
    background: #fff;
    border-radius: 16px;
    max-width: 720px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px 36px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: rfp360-modal-in 0.25s ease;
}

@keyframes rfp360-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.rfp360-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
}

.rfp360-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Modal body */
.rfp360-modal-body h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    line-height: 1.4;
}

.rfp360-modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 24px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 18px;
}

.rfp360-modal-meta-item label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 3px;
}

.rfp360-modal-meta-item span {
    font-size: 0.88rem;
    color: #334155;
    font-weight: 500;
}

.rfp360-modal-description {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.65;
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 8px;
    border-left: 3px solid #3b5bdb;
    margin-bottom: 18px;
    white-space: pre-wrap;
}

.rfp360-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rfp360-modal-actions a {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.18s;
}

.rfp360-modal-actions a.primary {
    background: #3b5bdb;
    color: #fff !important;
}

.rfp360-modal-actions a.primary:hover {
    background: #2f4ac4;
}

.rfp360-modal-actions a.secondary {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1;
}

.rfp360-modal-actions a.secondary:hover {
    background: #e2e8f0;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .rfp360-results-grid {
        grid-template-columns: 1fr;
    }
    .rfp360-modal-box {
        padding: 20px 18px;
    }
    .rfp360-modal-meta-grid {
        grid-template-columns: 1fr;
    }
    .rfp360-tabs {
        overflow-x: auto;
    }
    .rfp360-cta-banner {
        flex-direction: column;
        text-align: center;
    }
    .rfp360-cta-buttons {
        flex-direction: column;
    }
    .rfp360-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================================
   CTA Banner — "Want to win this contract?"
   ===================================================================== */
.rfp360-cta-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e40af 100%);
    border-radius: 14px;
    padding: 22px 24px;
    margin-top: 20px;
    animation: rfp360-modal-in 0.3s ease;
}

.rfp360-cta-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.rfp360-cta-text {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rfp360-cta-text strong {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.rfp360-cta-text span {
    color: #c7d2fe;
    font-size: 0.82rem;
    line-height: 1.4;
}

.rfp360-cta-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Base CTA button */
.rfp360-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}

/* Schedule Demo — bright indigo */
.rfp360-cta-demo {
    background: #818cf8;
    color: #fff !important;
}
.rfp360-cta-demo:hover {
    background: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(99,102,241,0.45);
}

/* Free Trial — emerald green */
.rfp360-cta-trial {
    background: #10b981;
    color: #fff !important;
}
.rfp360-cta-trial:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16,185,129,0.45);
}

/* Login → View Details — amber/orange */
.rfp360-cta-login {
    background: #f59e0b;
    color: #1e1b4b !important;
}
.rfp360-cta-login:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245,158,11,0.45);
}
