/* ================================================================
   CGP Virtual Site Tour — Form Styles
   Brand: black / white / #F5BE1E yellow — matches cgp.nyc
   ================================================================ */

/* ── Reset / scope ──────────────────────────────────────────────── */
.cgp-tour-wrapper *,
.cgp-tour-wrapper *::before,
.cgp-tour-wrapper *::after {
    box-sizing: border-box;
}

/* ── Wrapper ────────────────────────────────────────────────────── */
.cgp-tour-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px 48px;
    color: #111;
}

/* ── Header ─────────────────────────────────────────────────────── */
.cgp-tour-header {
    text-align: center;
    margin-bottom: 36px;
}

.cgp-tour-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.15;
}

.cgp-tour-subtitle {
    font-size: 16px;
    color: #555;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Progress ───────────────────────────────────────────────────── */
.cgp-tour-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 0;
}

.cgp-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.cgp-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: background .25s, color .25s;
}

.cgp-progress-step.active .cgp-step-circle,
.cgp-progress-step.done .cgp-step-circle {
    background: #F5BE1E;
    color: #000;
}

.cgp-step-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-align: center;
    white-space: nowrap;
}

.cgp-progress-step.active .cgp-step-label,
.cgp-progress-step.done .cgp-step-label {
    color: #111;
}

.cgp-progress-line {
    flex: 1;
    height: 2px;
    background: #e8e8e8;
    min-width: 24px;
    max-width: 80px;
    margin-bottom: 22px;
    transition: background .25s;
}

.cgp-progress-line.done {
    background: #F5BE1E;
}

/* ── Step card ──────────────────────────────────────────────────── */
.cgp-step {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    animation: cgpFadeIn .3s ease;
}

@keyframes cgpFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cgp-step h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 28px;
}

.cgp-step-sub {
    color: #555;
    margin: -18px 0 24px;
}

/* ── Fields ─────────────────────────────────────────────────────── */
.cgp-field {
    margin-bottom: 22px;
    position: relative;
}

.cgp-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #111;
}

.cgp-field .req {
    color: #E53E3E;
    margin-left: 2px;
}

.cgp-field input[type="text"],
.cgp-field input[type="email"],
.cgp-field input[type="tel"],
.cgp-field input[type="number"],
.cgp-field select,
.cgp-field textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    font-size: 15px;
    color: #111;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    font-family: inherit;
    appearance: none;
}

.cgp-field input[type="number"] {
    padding-right: 60px;
}

.cgp-input-suffix {
    position: absolute;
    right: 16px;
    bottom: 14px;
    font-size: 13px;
    color: #888;
    pointer-events: none;
}

.cgp-field input:focus,
.cgp-field select:focus,
.cgp-field textarea:focus {
    border-color: #F5BE1E;
    box-shadow: 0 0 0 3px rgba(245,190,30,.2);
    background: #fff;
}

.cgp-field input.error,
.cgp-field select.error,
.cgp-field textarea.error {
    border-color: #E53E3E;
    box-shadow: 0 0 0 3px rgba(229,62,62,.15);
}

.cgp-field textarea {
    resize: vertical;
    min-height: 110px;
}

.cgp-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ── Radio cards ────────────────────────────────────────────────── */
.cgp-radio-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.cgp-radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: border-color .2s, background .2s;
    flex: 1;
    min-width: 140px;
}

.cgp-radio-card input[type="radio"] {
    display: none;
}

.cgp-radio-card:has(input:checked) {
    border-color: #F5BE1E;
    background: #FFFBEA;
}

.cgp-radio-card:hover {
    border-color: #ccc;
    background: #fafafa;
}

.cgp-radio-icon {
    font-size: 22px;
}

/* ── Dropzone ───────────────────────────────────────────────────── */
.cgp-dropzone {
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
    background: #fafafa;
}

.cgp-dropzone:hover,
.cgp-dropzone.dragover {
    border-color: #F5BE1E;
    background: #FFFBEA;
}

.cgp-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.cgp-dropzone-inner {
    pointer-events: none;
}

.cgp-dropzone-inner svg {
    color: #aaa;
    margin-bottom: 10px;
}

.cgp-dropzone-inner p {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}

.cgp-browse-link {
    color: #b8960c;
    font-weight: 600;
    text-decoration: underline;
}

.cgp-dropzone-hint {
    font-size: 12px !important;
    color: #999 !important;
}

/* ── File list ──────────────────────────────────────────────────── */
.cgp-file-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.cgp-file-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}

.cgp-file-list .cgp-file-remove {
    margin-left: auto;
    cursor: pointer;
    color: #E53E3E;
    font-size: 16px;
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.cgp-step-nav {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cgp-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    font-family: inherit;
    letter-spacing: .01em;
}

.cgp-btn:active { transform: scale(.97); }

.cgp-btn-next,
.cgp-btn-submit {
    background: #F5BE1E;
    color: #000;
}

.cgp-btn-next:hover,
.cgp-btn-submit:hover {
    background: #e0ac0a;
}

.cgp-btn-back {
    background: #f0f0f0;
    color: #333;
}

.cgp-btn-back:hover { background: #e4e4e4; }

.cgp-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Error message ──────────────────────────────────────────────── */
.cgp-form-error {
    background: #FFF5F5;
    border: 1px solid #FC8181;
    color: #C53030;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 16px;
    font-size: 14px;
}

/* ── Calendly wrap ──────────────────────────────────────────────── */
.cgp-calendly-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* ── Tour note ──────────────────────────────────────────────────── */
.cgp-tour-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FFFBEA;
    border: 1px solid #F5BE1E;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 20px;
}

.cgp-tour-note svg {
    flex-shrink: 0;
    color: #b8960c;
    margin-top: 1px;
}

/* ── Success screen ─────────────────────────────────────────────── */
.cgp-success-screen {
    text-align: center;
    padding: 60px 20px;
    animation: cgpFadeIn .4s ease;
}

.cgp-success-icon {
    width: 72px;
    height: 72px;
    background: #F5BE1E;
    color: #000;
    font-size: 36px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.cgp-success-screen h2 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
}

.cgp-success-screen p {
    font-size: 16px;
    color: #555;
    max-width: 400px;
    margin: 0 auto;
}

/* ── CTA button (shortcode [cgp_tour_button]) ───────────────────── */
.cgp-tour-cta-btn {
    display: inline-block;
    background: #F5BE1E;
    color: #000 !important;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none !important;
    font-size: 16px;
    transition: background .2s, transform .15s;
}

.cgp-tour-cta-btn:hover {
    background: #e0ac0a;
    transform: translateY(-2px);
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .cgp-step {
        padding: 24px 20px;
    }
    .cgp-step-label {
        display: none;
    }
    .cgp-radio-group {
        flex-direction: column;
    }
    .cgp-step-nav {
        flex-direction: column-reverse;
    }
    .cgp-btn {
        width: 100%;
        text-align: center;
    }
    .cgp-progress-line {
        min-width: 16px;
    }
}
