/* =========================================================
   CP Marketing Assessment – Public Stylesheet
   ========================================================= */

/* ---- Reset / Base ---- */
.cpma-wrap *,
.cpma-wrap *::before,
.cpma-wrap *::after {
    box-sizing: border-box;
}

.cpma-wrap {
    font-family: Arial, sans-serif;
    color: #1e1e1e;
    line-height: 1.5;
}

.cpma-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Banner / scale guide ---- */
.cpma-banner {
    background: #0072BC;
    padding: 40px 20px 30px;
    text-align: center;
    color: #fff;
}

.cpma-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
}

.cpma-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
    color: rgba(255,255,255,.85);
}

.cpma-scale-bar {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    margin: 0 auto;
    max-width: 700px;
    position: relative;
}

.cpma-scale-item {
    flex: 1;
    text-align: center;
    position: relative;
    padding-bottom: 30px;
}

.cpma-scale-item::before {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,.5);
    margin-bottom: 6px;
}

.cpma-scale-num {
    display: inline-block;
    background: #fff;
    color: #0072BC;
    font-weight: 700;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    font-size: 13px;
}

.cpma-scale-label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,.9);
    margin-top: 4px;
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 0;
    text-align: center;
}

/* ---- Form section ---- */
.cpma-form-section {
    padding: 40px 0;
}

.cpma-form-header h3 {
    font-size: 20px;
    color: #0072BC;
    margin-bottom: 24px;
    border-bottom: 2px solid #0072BC;
    padding-bottom: 10px;
}

.cpma-form-messages {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 600;
}

.cpma-form-messages.cpma-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cpma-form-messages.cpma-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---- Questions ---- */
.cpma-question-row {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.cpma-question-row:last-of-type {
    border-bottom: none;
}

.cpma-question-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0 0 12px;
    line-height: 1.4;
}

.cpma-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cpma-radio-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.cpma-radio-item input[type="radio"] {
    display: none;
}

.cpma-radio-item label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all .2s ease;
    color: #555;
}

.cpma-radio-item input[type="radio"]:checked + label {
    background: #0072BC;
    border-color: #0072BC;
    color: #fff;
}

.cpma-radio-item label:hover {
    border-color: #0072BC;
    color: #0072BC;
}

/* ---- Lead fields ---- */
.cpma-lead-fields {
    margin-top: 30px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.cpma-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media ( max-width: 600px ) {
    .cpma-field-row {
        grid-template-columns: 1fr;
    }
}

.cpma-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color .2s;
}

.cpma-input:focus {
    outline: none;
    border-color: #0072BC;
    box-shadow: 0 0 0 2px rgba(0,114,188,.15);
}

.cpma-submit-row {
    margin-top: 20px;
    text-align: center;
}

.cpma-submit-btn {
    background: #0072BC;
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s;
    font-family: Arial, sans-serif;
}

.cpma-submit-btn:hover {
    background: #005a96;
}

.cpma-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.cpma-response-msg {
    margin-top: 10px;
    font-size: 14px;
    color: #0072BC;
    min-height: 20px;
}

/* =========================================================
   Result page
   ========================================================= */

.cpma-result-section {
    padding: 40px 0;
}

.cpma-result-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    max-width: 860px;
    margin: 0 auto;
}

.cpma-result-greeting h3 {
    font-size: 24px;
    text-align: center;
    color: #0072BC;
    margin-bottom: 24px;
}

.cpma-coaching-format {
    background: #f8f9fa;
    border-left: 4px solid #0072BC;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.cpma-report-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cpma-result-title {
    font-size: 16px;
    font-weight: 700;
    color: #0072BC;
    letter-spacing: .5px;
    margin: 0;
}

.cpma-result-title span {
    color: #F27D0C;
}

.cpma-title-spaced {
    margin-bottom: 12px;
}

.cpma-download-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #F27D0C;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}

.cpma-download-icon:hover {
    color: #c9640a;
}

.cpma-overall-score {
    font-size: 20px;
    margin: 20px 0 10px;
}

.cpma-score-num {
    font-size: 28px;
    font-weight: 700;
}

/* Band colours */
.cpma-band-red    { color: #e74c3c; }
.cpma-band-yellow { color: #d4a017; }
.cpma-band-orange { color: #e67e22; }
.cpma-band-green  { color: #27ae60; }

/* Progress bar */
.cpma-result-bar-wrapper {
    height: 18px;
    background: #e0e0e0;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 20px;
}

.cpma-result-bar {
    height: 100%;
    border-radius: 9px;
    transition: width .6s ease;
}

.cpma-result-bar.cpma-band-red    { background: #e74c3c; }
.cpma-result-bar.cpma-band-yellow { background: #f1c40f; }
.cpma-result-bar.cpma-band-orange { background: #e67e22; }
.cpma-result-bar.cpma-band-green  { background: #27ae60; }

/* Interpretation table */
.cpma-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cpma-table-header th {
    background: #0072BC;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
}

.cpma-summary-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.cpma-summary-table tr:nth-child(even) td {
    background: #f8f8f8;
}

.cpma-active-band td {
    font-weight: 700;
    background: #fff9e0 !important;
}

/* Question breakdown */
.cpma-question-breakdown {
    margin-top: 24px;
}

.cpma-q-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cpma-q-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.cpma-q-num {
    font-weight: 700;
    min-width: 28px;
    color: #0072BC;
}

.cpma-q-label {
    flex: 1;
}

.cpma-q-score {
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    background: #e0e0e0;
    font-size: 13px;
    white-space: nowrap;
}

.cpma-q-score.cpma-band-red    { background: #fdecea; color: #c0392b; }
.cpma-q-score.cpma-band-yellow { background: #fef9e7; color: #9a7a00; }
.cpma-q-score.cpma-band-orange { background: #fef0e7; color: #b05c0d; }
.cpma-q-score.cpma-band-green  { background: #eafbea; color: #1e8449; }

/* Result actions */
.cpma-result-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cpma-btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: none;
    font-family: Arial, sans-serif;
}

.cpma-btn-primary {
    background: #0072BC;
    color: #fff;
}

.cpma-btn-primary:hover {
    background: #005a96;
    color: #fff;
}

.cpma-btn-download {
    background: #F27D0C;
    color: #fff;
}

.cpma-btn-download:hover {
    background: #c9640a;
    color: #fff;
}

/* Not-found state */
.cpma-not-found {
    text-align: center;
    padding: 60px 20px;
}

.cpma-not-found h1 {
    color: #e74c3c;
}

/* Notice */
.cpma-notice {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

@media ( max-width: 600px ) {
    .cpma-result-card { padding: 16px; }
    .cpma-summary-table { font-size: 12px; }
    .cpma-result-actions { flex-direction: column; }
    .cpma-q-row { flex-wrap: wrap; }
}
