/**
 * Car Sell Pro - Compact Frontend Styles
 * Designed to fit above the fold without scrolling
 */

:root {
    --csp-primary: #00ACC1;
    --csp-primary-dark: #008B8B;
    --csp-gray-100: #F7FAFC;
    --csp-gray-200: #E2E8F0;
    --csp-gray-400: #A0AEC0;
    --csp-gray-500: #718096;
    --csp-gray-600: #4A5568;
    --csp-gray-700: #2D3748;
    --csp-gray-800: #1A202C;
    --csp-white: #FFFFFF;
    --csp-border: #E2E8F0;
    --csp-radius: 6px;
}

/* ========== COMPACT FORM WRAPPER ========== */
.csp-form-wrapper {
    max-width: 570px;
	padding:14px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--csp-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    overflow: hidden;
	position:relative;
}
/* ============================================
   CAR SELL PRO – TRUE TAB LOOK (NOT SWITCHER)
   ============================================ */

/* Tab rail background */
body .csp-form-wrapper .csp-tabs-inner {
    background-color: #f3f4f6; /* light gray track */
    padding: 4px;
    border-radius: 999px;
}

/* Base tab style (both tabs) */
body .csp-form-wrapper .csp-tabs-inner .csp-tab {
    background: transparent !important;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    padding: 8px 18px;
    box-shadow: none !important;
    outline: none !important;
    transition: background-color 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease;
}

/* Inactive tab */
body .csp-form-wrapper .csp-tabs-inner .csp-tab:not(.active) {
    background: transparent !important;
    color: #0f172a !important;
}

/* Active tab (the one whose fields you’re seeing) */
body .csp-form-wrapper .csp-tabs-inner .csp-tab.active {
    background-color: #00ACC1 !important;  /* teal pill */
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 166, 166, 0.35) !important;
}

/* Subtle hover, but don’t fight Elementor */
body .csp-form-wrapper .csp-tabs-inner .csp-tab:hover {
    background-color: rgba(0, 166, 166, 0.06) !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

/* ============================================
   TCPA / Carrier Consent UI
   ============================================ */
.csp-consent-wrap{
    margin-top: 10px;
    width: 100%;
}

.csp-consent-label{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--csp-gray-800);
}

.csp-consent-label input[type="checkbox"]{
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 2px 0 0 0;
    padding: 0;
    border-radius: 3px;
    box-sizing: border-box;
    transform: none;
}

.csp-consent-disclosure{
    width: 100%;
    margin-top: 6px;
    margin-left: 28px; /* align under label text */
    font-size: 12px;
    line-height: 1.4;
    color: var(--csp-gray-600);
}

/* ============================================
   Car Sell Pro – Full-Width Primary Button
   ============================================ */

body .csp-form-wrapper #csp-get-offer-btn,
body .csp-form-wrapper .csp-btn.csp-btn-primary,
body .csp-form-wrapper button[type=submit] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;

    /* Visual style */
    background-color: var(--csp-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;

    height: 54px !important;
    line-height: 54px !important;
    font-size: 16px !important;
    font-weight: 600 !important;

    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;

    box-shadow: 0 8px 22px rgba(0, 166, 166, 0.25) !important;

    cursor: pointer;
}

/* Remove hover effects (clean, static UI) */
body .csp-form-wrapper #csp-get-offer-btn:hover,
body .csp-form-wrapper .csp-btn.csp-btn-primary:hover,
body .csp-form-wrapper button[type=submit]:hover {
    color: #ffffff !important;
    box-shadow: none !important;
}


/* Header - Compact */
.csp-form-header {
    padding: 14px 16px 8px;
    text-align: left;
}

.csp-form-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--csp-gray-800);
    margin: 0 0 2px;
    line-height: 1.2;
}

.csp-form-subtitle {
    font-size: 12px;
    color: var(--csp-gray-500);
    margin: 0;
}

/* Tabs - Compact */
.csp-tabs {
    display: flex;
    justify-content: center;
    padding: 0 16px 10px;
}

.csp-tabs-inner {
    display: flex;
    background: var(--csp-gray-100);
    border-radius: 20px;
    padding: 3px;
    width: 100%;
}

.csp-tab {
    flex: 1;
    padding: 7px 12px;
    border: none;
    background: transparent;
    color: var(--csp-gray-500);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.2s;
}

.csp-tab.active {
    background: var(--csp-white);
    color: var(--csp-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.csp-tab-content { display: none; }
.csp-tab-content.active { display: block; }

/* Form */
.csp-valuation-form,
.csp-booking-form {
    padding: 0 16px;
}

/* Form Groups - Compact */
.csp-form-group {
    margin-bottom: 8px;
}

.csp-form-group label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--csp-gray-600);
    margin-bottom: 3px;
    text-transform: uppercase;
}

.csp-form-group input,
.csp-form-group select {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--csp-border);
    border-radius: var(--csp-radius);
    font-size: 13px;
    color: var(--csp-gray-800);
    background: var(--csp-white);
    box-sizing: border-box;
}

.csp-form-group input:focus,
.csp-form-group select:focus {
    outline: none;
    border-color: var(--csp-primary);
}

.csp-form-group input::placeholder {
    color: var(--csp-gray-400);
}

/* Input with icon */
.csp-input-icon-wrapper {
    position: relative;
}

.csp-input-icon-wrapper .csp-input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--csp-gray-400);
    pointer-events: none;
}

.csp-input-icon-wrapper .csp-input-icon svg {
    width: 16px;
    height: 16px;
}

.csp-input-icon-wrapper input,
.csp-input-icon-wrapper select {
    padding-left: 32px;
}

.csp-input-icon-wrapper .csp-input-suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--csp-gray-500);
    font-size: 11px;
}

/* Form Rows */
.csp-form-row {
    display: flex;
    gap: 8px;
}

.csp-row-2 .csp-form-group,
.csp-row-3 .csp-form-group {
    flex: 1;
    min-width: 0;
}

/* File Upload - Compact */
.csp-file-upload-label {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--csp-gray-600) !important;
    text-transform: none !important;
    margin-bottom: 4px !important;
}

.csp-file-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--csp-border);
    border-radius: var(--csp-radius);
    background: var(--csp-white);
}

.csp-file-upload-btn {
    padding: 5px 10px;
    background: var(--csp-primary);
    color: var(--csp-white);
    border: none;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.csp-file-upload-text {
    font-size: 12px;
    color: var(--csp-gray-500);
}

.csp-file-input { display: none; }

/* Button - Compact */
.csp-form-submit {
    padding: 10px 0 6px;
}

.csp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.csp-btn-primary {
    background: var(--csp-primary);
    color: var(--csp-white);
    box-shadow: 0 4px 12px rgba(0,166,166,0.35);
}

.csp-btn-primary:hover {
    background: var(--csp-primary-dark);
    transform: translateY(-1px);
}

.csp-btn-secondary {
    background: var(--csp-white);
    color: var(--csp-gray-700);
    border: 1px solid var(--csp-gray-200);
}

.csp-btn-block { width: 100%; }

/* Footer - Compact */
.csp-form-footer {
    padding: 6px 0 12px;
    text-align: center;
}

.csp-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--csp-gray-500);
}

.csp-secure-badge svg {
    width: 10px;
    height: 12px;
}

/* Bottom Bar */
.csp-bottom-bar {
    bottom: 0;
    position: absolute;
    height: 4px;
    background: var(--csp-primary);
    left: 0;
    right: 0;
}

/* Loading */
.csp-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.csp-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--csp-gray-200);
    border-top-color: var(--csp-primary);
    border-radius: 50%;
    animation: csp-spin 0.8s linear infinite;
    margin: 0 auto 8px;
}

@keyframes csp-spin {
    to { transform: rotate(360deg); }
}

.csp-loading-text {
    font-size: 13px;
    color: var(--csp-gray-600);
}

/* Step container */
.csp-step { position: relative; }

/* ========== RESULTS STEP ========== */
.csp-results-wrapper {
    background: linear-gradient(135deg, var(--csp-primary) 0%, var(--csp-primary-dark) 100%);
    padding: 16px;
    position: relative;
}

.csp-close-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 26px; height: 26px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: var(--csp-white);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csp-results-header {
    text-align: center;
    margin-bottom: 14px;
}

.csp-results-title {
    color: var(--csp-white);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 2px;
}

.csp-vehicle-name {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin: 0;
}

.csp-results-body {
    background: var(--csp-white);
    border-radius: 10px;
    padding: 16px;
}

.csp-estimate-label {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--csp-gray-500);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.csp-estimate-range {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--csp-gray-800);
    margin-bottom: 12px;
}

.csp-assessment {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--csp-gray-100);
    padding: 10px;
    border-radius: var(--csp-radius);
    margin-bottom: 14px;
}

.csp-assessment svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--csp-primary);
}

.csp-assessment p {
    font-size: 11px;
    color: var(--csp-gray-600);
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

.csp-booking-toggle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csp-booking-toggle .csp-btn {
    padding: 10px 16px;
    font-size: 13px;
}

.csp-disclaimer {
    font-size: 9px;
    color: var(--csp-gray-500);
    text-align: center;
    margin-top: 10px;
}

/* ========== SUCCESS STEP ========== */
.csp-success-wrapper {
    padding: 30px 20px;
    text-align: center;
}

.csp-success-icon {
    margin-bottom: 16px;
}

.csp-success-icon svg {
    width: 60px;
    height: 60px;
}

.csp-success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--csp-gray-800);
    margin: 0 0 8px;
}

.csp-success-message {
    font-size: 13px;
    color: var(--csp-gray-600);
    margin: 0 0 16px;
    line-height: 1.5;
}

.csp-success-details {
    text-align: left;
    background: var(--csp-gray-100);
    padding: 14px;
    border-radius: var(--csp-radius);
    margin-bottom: 16px;
}

.csp-success-details p {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--csp-gray-700);
}

.csp-success-details ol {
    margin: 0;
    padding-left: 18px;
}

.csp-success-details li {
    font-size: 12px;
    color: var(--csp-gray-600);
    margin-bottom: 4px;
}

/* Helper Text */
.csp-helper-text {
    font-size: 11px;
    color: var(--csp-gray-500);
    margin: 4px 0 8px;
    font-style: italic;
}

/* Review Notice */
.csp-review-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f9f9;
    border: 1px solid var(--csp-primary);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 20px 0;
}

.csp-review-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.csp-review-notice p {
    margin: 0;
    font-size: 13px;
    color: var(--csp-gray-700);
    font-weight: 500;
}

/* Error */
.csp-error {
    background: #FED7D7;
    color: #C53030;
    padding: 8px 12px;
    border-radius: var(--csp-radius);
    font-size: 12px;
    margin-bottom: 10px;
}

/* Select dropdown arrow */
.csp-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.csp-input-icon-wrapper select {
    background-position: right 10px center;
}

/* Uppercase */
.csp-uppercase { text-transform: uppercase; }

/* Required */
.required { color: #E53E3E; }

/* ========== RESPONSIVE ========== */
@media (max-width: 420px) {
    .csp-form-wrapper {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    
    .csp-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ========== BOOKING ONLY FORM ========== */
.csp-booking-only {
    max-width: 450px;
}

.csp-booking-only .csp-form-header {
    padding: 16px;
    background: var(--csp-primary);
}

.csp-booking-only .csp-form-title {
    color: var(--csp-white);
    margin: 0;
}

.csp-booking-only .csp-booking-form {
    padding: 16px;
}

.csp-form-section {
    margin-bottom: 16px;
}

.csp-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--csp-gray-700);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--csp-gray-200);
}

/* ========== PHOTO UPLOAD ========== */
.csp-photo-upload-group {
    margin-bottom: 12px;
}

.csp-upload-hint {
    font-size: 10px;
    color: var(--csp-gray-500);
    margin: 4px 0 8px;
}

.csp-upload-description {
    font-size: 11px;
    color: var(--csp-gray-600);
    margin: 0 0 10px;
}

.csp-photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.csp-photo-preview {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--csp-gray-200);
}

.csp-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.csp-photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #E53E3E;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.csp-photo-remove:hover {
    background: #C53030;
}

.csp-file-upload-btn {
    padding: 5px 10px;
    background: var(--csp-primary);
    color: var(--csp-white);
    border: none;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.csp-file-upload-btn svg {
    width: 14px;
    height: 14px;
}

.csp-file-upload-btn:hover {
    background: var(--csp-primary-dark);
}
