/* ============================================================
   Voyage Risk — Shared component styles (Phase 5)
   Loaded site-wide via _Layout.cshtml.
   Adds component-level styles without touching site.css.
   ============================================================ */

/* ---------- Example Alert component (_ExampleAlert.cshtml) ---------- */

.alert-card {
    background: var(--white, #ffffff);
    border: 1px solid var(--light-gray, #e2e8f0);
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm, 0 2px 6px rgba(0, 0, 0, 0.05));
    max-width: 520px;
    color: var(--text, #4a5568);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.alert-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-severity {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: var(--warning, #f59e0b);
    line-height: 1.4;
}

.alert-severity--low       { background: #6b7280; }
.alert-severity--moderate  { background: #0284c7; }
.alert-severity--high      { background: var(--warning, #f59e0b); }
.alert-severity--critical  { background: var(--danger, #b91c1c); }

.alert-timestamp {
    font-size: 0.82rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.alert-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark, #1a202c);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.alert-card__location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--secondary, #2c5282);
    margin: 0 0 10px 0;
    font-weight: 500;
}

.alert-card__location i {
    color: var(--secondary, #2c5282);
}

.alert-card__summary {
    font-size: 0.95rem;
    margin: 0 0 14px 0;
    color: var(--text, #4a5568);
}

.alert-card__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #6b7280;
    padding: 10px 0 0 0;
    border-top: 1px dashed var(--light-gray, #e2e8f0);
}

.alert-card__sources {
    padding: 10px 0 0 0;
    font-size: 0.88rem;
    border-top: 1px dashed var(--light-gray, #e2e8f0);
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.alert-card__sources-label {
    font-weight: 700;
    color: var(--dark, #1a202c);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}

.alert-card__source-link {
    color: var(--primary, #003a6b);
    text-decoration: none;
    font-weight: 600;
}

.alert-card__source-link:hover {
    text-decoration: underline;
}

.alert-card__json {
    margin-top: 14px;
    border-top: 1px solid var(--light-gray, #e2e8f0);
    padding-top: 14px;
}

.alert-card__json > summary {
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary, #003a6b);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    list-style: none;
    user-select: none;
}

.alert-card__json > summary::-webkit-details-marker {
    display: none;
}

.alert-card__json > summary::after {
    content: " +";
}

.alert-card__json[open] > summary::after {
    content: " \2013";
}

.alert-card__json pre {
    margin: 12px 0 0 0;
    padding: 14px 16px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.55;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    white-space: pre;
}

.alert-card__json code {
    font-family: inherit;
    color: inherit;
    background: transparent;
    padding: 0;
}

.alert-card__illustrative {
    margin: 12px 0 0 0;
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
    font-style: italic;
}

/* ---------- Image placeholder component ---------- */

.image-placeholder {
    background: #f3f4f6;
    border: 1px dashed #cbd5e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.88rem;
    text-align: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0;
}

.image-placeholder__label {
    display: inline-block;
    font-weight: 600;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.82rem;
    max-width: 90%;
    color: #4a5568;
    z-index: 2;
    position: relative;
}

.image-placeholder--1x1   { aspect-ratio: 1 / 1; }
.image-placeholder--4x3   { aspect-ratio: 4 / 3; }
.image-placeholder--16x9  { aspect-ratio: 16 / 9; }

.image-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, transparent 48%, rgba(0, 0, 0, 0.025) 48%, rgba(0, 0, 0, 0.025) 52%, transparent 52%);
    background-size: 14px 14px;
    pointer-events: none;
    z-index: 1;
}

/* Dark-section variants */
.section-dark .image-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
}

.section-dark .image-placeholder__label {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
}

/* ---------- Alert showcase layout helpers ---------- */

.alert-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.alert-showcase-grid > * {
    min-width: 0;
}

@media (max-width: 900px) {
    .alert-showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Platform portal placeholders grid ---------- */

.portal-placeholders {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .portal-placeholders {
        grid-template-columns: 1fr;
    }
}

/* ---------- API working-with-the-API page blocks ---------- */

.api-block {
    max-width: 820px;
    margin: 0 auto 28px auto;
}

.api-block:last-child {
    margin-bottom: 0;
}

.api-block h3 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: var(--dark, #1a202c);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.api-block p {
    margin: 0 0 10px 0;
}

.api-block pre {
    margin: 0;
    padding: 14px 16px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.55;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    white-space: pre;
}

.api-block code {
    font-family: inherit;
    color: inherit;
    background: transparent;
    padding: 0;
}

.api-chip-example {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(15, 98, 254, 0.08);
    color: var(--accent, #0f62fe);
    border: 1px solid rgba(15, 98, 254, 0.2);
}

.api-muted-note {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 10px 0;
    font-style: italic;
}

/* ---------- Comparison cards (_ComparisonCards.cshtml) ---------- */

.comparison-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 980px;
    margin: 0 auto;
}

.comparison-card {
    border-radius: 12px;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.comparison-card__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0;
}

.comparison-card__tagline {
    font-style: italic;
    font-weight: 500;
    font-size: 1.35rem;
    line-height: 1.35;
    margin: 0;
}

.comparison-card__body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Muted card (left — category / competing approach) */
.comparison-card--muted {
    background: var(--light-gray, #e2e8f0);
    color: var(--text, #4a5568);
}

.comparison-card--muted .comparison-card__label,
.comparison-card--muted .comparison-card__tagline,
.comparison-card--muted .comparison-card__body {
    color: var(--text, #4a5568);
}

/* Primary card (right — brand navy, preferred approach) */
.comparison-card--primary {
    background: var(--primary, #003a6b);
    color: var(--white, #ffffff);
}

.comparison-card--primary .comparison-card__label {
    color: rgba(255, 255, 255, 0.72);
}

.comparison-card--primary .comparison-card__tagline {
    color: var(--white, #ffffff);
    font-weight: 600;
}

.comparison-card--primary .comparison-card__body {
    color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 768px) {
    .comparison-cards {
        grid-template-columns: 1fr;
    }

    .comparison-card {
        padding: 28px 28px;
    }
}

/* ---------- Billing note (pricing page) ---------- */

.billing-note {
    max-width: 720px;
    margin: 28px auto 0 auto;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text, #4a5568);
    padding: 14px 18px;
    background: rgba(15, 98, 254, 0.04);
    border: 1px solid rgba(15, 98, 254, 0.12);
    border-radius: 10px;
}
