:root {
    --brand-navy: #122e4d;   /* dark blue from logo */
    --brand-green: #3a9e4a;  /* green from logo */
    --light-green: #ecfdf5;
    --border-light: #e2e8f0;
}

/* Layout */
.pcv-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    font-family: 'Montserrat', sans-serif;
    background: #f8fafc;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    color: #334155;
}

.pcv-editor {
    flex: 1;
    min-width: 380px;
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.pcv-preview-container {
    flex: 1.2;
    min-width: 350px;
    display: flex;
    justify-content: center;
}

/* Headings */
.pcv-editor h3 {
    font-weight: 700;
    color: var(--brand-navy);
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 22px;
}

.pcv-editor h4 {
    font-weight: 700;
    font-size: 13px;
    color: var(--brand-navy);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.06em;
}

/* Form sections */
.pcv-form-section {
    margin-bottom: 24px;
}

.pcv-input-group {
    margin-bottom: 15px;
    width: 100%;
}

.pcv-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Modern Inputs ===== */
/* === Modern Soft Inputs with #F8FAFC Background & Extra Padding === */

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 14px 18px; /* MORE PADDING */
    border-radius: 12px;
    border: 1px solid #dbeafe;        /* subtle light border */
    background: #F8FAFC;              /* << YOUR COLOR */
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #0f172a;
    box-sizing: border-box;
    outline: none;

    /* Soft floating shadow */
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        transform 0.08s ease;
}

/* Hover effect */
input[type="text"]:hover,
select:hover,
textarea:hover {
    background: #f1f5f9; /* light hover */
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.10);
}

/* Focus effect with BRAND GREEN ring */
input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-green);
    background: #ffffff;
    box-shadow:
        0 0 0 2px rgba(58, 158, 74, 0.35), /* green ring */
        0 6px 14px rgba(15, 23, 42, 0.15);
    transform: translateY(-1px);
}

/* Placeholder softer */
input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}


textarea {
    resize: vertical;
}

/* Row helpers */
.pcv-row {
    display: flex;
    gap: 20px;
}

.pcv-col-half {
    width: 50%;
}

.pcv-ui-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* ===== Buttons (brand colours) ===== */

/* Small green "+" buttons */
.pcv-btn-add-sm {
    background-color: var(--light-green);
    color: var(--brand-green);
    border: 1px solid #bbf7d0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

.pcv-btn-add-sm:hover {
    background-color: #dcfce7;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

/* Green pill “Add Reference / Add Club” */
.pcv-btn-add-pill {
    background: var(--light-green);
    color: var(--brand-green);
    border: 1px solid #bbf7d0;
    padding: 8px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

.pcv-btn-add-pill:hover {
    background: #dcfce7;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

/* Red delete buttons */
.pcv-btn-del {
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    width: 42px;
    height: 40px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

.pcv-btn-del:hover {
    background-color: #fecaca;
    box-shadow: 0 2px 6px rgba(248, 113, 113, 0.4);
    transform: translateY(-1px);
}

/* Main navy Download button */
#pcv-download-btn {
    background: var(--brand-navy);
    color: #ffffff;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    margin-top: 30px;
    box-shadow: 0 10px 25px rgba(18, 46, 77, 0.35);
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

#pcv-download-btn:hover {
    background: #0b2038;
    box-shadow: 0 14px 32px rgba(18, 46, 77, 0.45);
    transform: translateY(-1px);
}

/* Repeater layout */
.pcv-dynamic-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.pcv-ref-block {
    margin-bottom: 20px;
}

.pcv-ref-row {
    margin-bottom: 8px;
}

/* Document / preview (matches reference design) */
.pcv-document {
    width: 794px;
    background: #ffffff;
    padding: 40px;
    box-sizing: border-box;
    position: relative;
    border: 1px solid var(--border-light);
}

@media (max-width: 900px) {
    .pcv-document {
        transform: scale(0.7);
        transform-origin: top left;
        margin-bottom: -250px;
    }
}

.pcv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pcv-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Top section */
.pcv-top-section {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    align-items: flex-start;
}

.pcv-photo-col {
    width: 30%;
}

.pcv-photo-frame {
    width: 100%;
    height: 230px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pcv-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcv-season-badge {
    background: #ffffff;
    text-align: center;
    border: 1px solid var(--border-light);
    padding: 5px;
    font-weight: 700;
    font-size: 12px;
    margin-top: -1px;
    color: var(--brand-navy);
}

.pcv-info-col {
    width: 70%;
}

.pcv-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.pcv-info-col h1 {
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-navy);
}

.pcv-info-table {
    width: 100%;
    border-collapse: collapse;
}

.pcv-info-table td {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.pcv-info-table td:first-child {
    width: 140px;
    font-weight: 600;
    color: #64748b;
}

/* Body sections */
.pcv-divider {
    border: 0;
    border-top: 2px solid #f1f5f9;
    margin: 25px 0;
}

.pcv-grid {
    display: flex;
    gap: 30px;
}

.pcv-col-left {
    width: 55%;
}

.pcv-col-right {
    width: 45%;
}

.pcv-section {
    margin-bottom: 25px;
}

.pcv-section h3 {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-navy);
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 6px;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.pcv-section p {
    font-size: 13px;
    line-height: 1.5;
}

.pcv-list,
.pcv-check-list,
.pcv-warn-list {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 13px;
}

.pcv-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    justify-content: space-between;
}

/* Strengths / Weaknesses icons */
.pcv-check-list li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.pcv-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand-green);
    font-weight: bold;
}

.pcv-warn-list li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.pcv-warn-list li::before {
    content: "!";
    position: absolute;
    left: 0;
    color: #ea580c;
    font-weight: bold;
}

.pcv-stats-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.pcv-stats-table th {
    background: #f8fafc;
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #cbd5e1;
    color: var(--brand-navy);
}

.pcv-stats-table td {
    padding: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.pcv-row-simple {
    display: flex;
    gap: 20px;
}

.pcv-half {
    width: 50%;
}

.pcv-footer {
    height: 12px;
    background: var(--brand-navy);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

/* Loader overlay */
#pcv-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18,46,77,0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pcv-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ffffff;
    border-top: 4px solid var(--brand-green);
    border-radius: 50%;
    animation: pcv-spin 1s linear infinite;
}

@keyframes pcv-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== PDF POPUP FOR html2pdf ===== */
.pcv-pdf-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.75);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcv-pdf-inner {
    background: #ffffff;
    padding: 0;
    box-shadow: 0 20px 40px rgba(15,23,42,0.35);
}

.pcv-pdf-inner .pcv-document {
    width: 794px !important;
    max-width: 794px !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;
}
/* ================================
   MOBILE (FULL WIDTH / NO SCROLL)
   ================================ */
/* ========================================================
   FIX LEFT/RIGHT SPACING ON MEDIUM + MOBILE DEVICES
   ======================================================== */

/* Apply to all screens below 1100px */
@media (max-width: 1100px) {

    /* Remove side spacing completely */
    .pcv-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Form full-width */
    .pcv-editor {
        width: 100% !important;
        min-width: 100% !important;
        padding: 20px 15px !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    /* Preview wrapper full-width */
    .pcv-preview-container {
        width: 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block;
    }

    /* CV document edge-to-edge */
    .pcv-document {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
        border: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* EVEN MORE strict cleanup for phones */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    .pcv-top-section,
    .pcv-grid {
        flex-direction: row !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .pcv-col-left,
    .pcv-col-right {
        width: 100% !important;
    }

}

