/**
 * Ford Compare Modal Styling (100% Matching Visual Design)
 */

:root {
    --fcp-navy: #001A4E;
    --fcp-blue: #0056cc;
    --fcp-blue-line: #155dfc;
    --fcp-text-dark: #0f172a;
    --fcp-text-muted: #64748b;
    --fcp-border: #cbd5e1;
    --fcp-bg-zebra: #f4f6f9;
}

/* Modal Overlay */
.fcp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.fcp-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Dialog */
.fcp-modal-dialog {
    background-color: #ffffff;
    width: 95%;
    max-width: 1080px;
    max-height: 92vh;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    padding: 35px 30px 45px;
    box-sizing: border-box;
}

/* Close Button (Circle light-gray with X) */
.fcp-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #0f172a;
    border: none;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.fcp-modal-close:hover {
    background-color: #cbd5e1;
    color: #000000;
    transform: scale(1.05);
}

/* Modal Title */
.fcp-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.fcp-modal-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--fcp-navy);
    letter-spacing: -0.5px;
    margin: 0;
    text-transform: none;
}

/* =========================================
   TOP SECTION (3 Columns)
   ========================================= */
.fcp-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.fcp-top-col {
    display: flex;
    flex-direction: column;
}

/* Vehicle Cutout Image Container */
.fcp-img-container {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.fcp-car-img {
    max-width: 100%;
    max-height: 130px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.fcp-img-placeholder {
    opacity: 0.3;
}

/* Dropdown Select Boxes */
.fcp-dropdowns-wrap {
    margin-bottom: 15px;
}

.fcp-select-box {
    margin-bottom: 8px;
    position: relative;
}

.fcp-select-cat,
.fcp-select-vehicle {
    width: 100%;
    padding: 7px 28px 7px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fcp-text-dark);
    background-color: #ffffff;
    border: 1px solid var(--fcp-border);
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.fcp-select-cat:focus,
.fcp-select-vehicle:focus {
    outline: none;
    border-color: var(--fcp-blue);
}

/* Persona & Marketing */
.fcp-persona-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fcp-tagline {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--fcp-blue);
    text-transform: uppercase;
    margin-bottom: 12px;
    min-height: 26px;
    line-height: 1.25;
}

.fcp-best-for-box {
    margin-bottom: 14px;
    min-height: 48px;
}

.fcp-best-for-lbl {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--fcp-text-dark);
    margin-bottom: 3px;
}

.fcp-best-for-val {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.35;
}

.fcp-strengths-box {
    margin-bottom: 10px;
}

.fcp-strengths-lbl {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--fcp-text-dark);
    margin-bottom: 6px;
}

.fcp-strengths-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fcp-strengths-list li {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.4;
    margin-bottom: 4px;
    position: relative;
    padding-left: 14px;
}

.fcp-strengths-list li::before {
    content: '•';
    color: var(--fcp-blue);
    position: absolute;
    left: 0;
    top: -1px;
    font-size: 1.1rem;
    line-height: 1;
}

/* =========================================
   BOTTOM SECTION (Accordions)
   ========================================= */
.fcp-accordions-wrap {
    margin-top: 20px;
}

.fcp-acc-item {
    border-top: 1.5px solid var(--fcp-blue-line);
    border-bottom: 1.5px solid var(--fcp-blue-line);
    margin-bottom: 12px;
}

.fcp-acc-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 12px 15px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.fcp-acc-header:hover {
    background-color: rgba(21, 93, 252, 0.04);
}

.fcp-acc-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--fcp-navy);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.fcp-acc-icon {
    position: absolute;
    right: 15px;
    color: var(--fcp-blue);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

/* Accordion Body */
.fcp-acc-body {
    padding: 10px 0 15px;
}

/* Thead Row (Model Names) */
.fcp-table-thead {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 8px 10px 14px;
    text-align: center;
}

.fcp-thead-col {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--fcp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Spec Rows */
.fcp-spec-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 9px 10px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 2px;
}

.fcp-spec-row.zebra-shaded {
    background-color: var(--fcp-bg-zebra);
}

.fcp-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fcp-cell-label {
    font-size: 0.78rem;
    color: var(--fcp-text-muted);
    margin-bottom: 2px;
    line-height: 1.2;
}

.fcp-cell-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--fcp-navy);
    line-height: 1.25;
}

/* =========================================
   RESPONSIVE (Mobile < 768px)
   ========================================= */
@media (max-width: 767px) {
    .fcp-modal-dialog {
        padding: 25px 15px 35px;
        width: 96%;
    }

    .fcp-modal-title {
        font-size: 1.6rem;
    }

    .fcp-modal-close {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    /* 2-Column Mode: Hide Column 3 */
    .fcp-top-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fcp-table-thead,
    .fcp-spec-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .fcp-col-3 {
        display: none !important;
    }

    .fcp-img-container {
        height: 110px;
    }

    .fcp-car-img {
        max-height: 95px;
    }

    .fcp-tagline {
        font-size: 0.92rem;
        min-height: 22px;
    }

    .fcp-cell-val {
        font-size: 0.82rem;
    }
}
