/* LGY Autocaster - Car Value Forecast */
.lgy-ac-wrap {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

.lgy-ac-main-heading {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: #1a1a2e;
}

/* Progress Steps */
.lgy-ac-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0;
}

.lgy-ac-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.lgy-ac-step.active,
.lgy-ac-step.done {
    opacity: 1;
}

.lgy-ac-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.lgy-ac-step.active .lgy-ac-step-num {
    background: var(--lgy-accent, #0d6efd);
    color: #fff;
}

.lgy-ac-step.done .lgy-ac-step-num {
    background: #198754;
    color: #fff;
}

.lgy-ac-step-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.lgy-ac-step-line {
    width: 40px;
    height: 2px;
    background: #ddd;
    margin: 0 0.5rem;
}

/* Panel */
.lgy-ac-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lgy-ac-panel h3 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: #1a1a2e;
    border: none;
    padding: 0;
}

/* Registration Lookup */
.lgy-ac-lookup {
    margin-bottom: 0;
}

.lgy-ac-lookup label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #374151;
    display: block;
}

.lgy-ac-lookup-row {
    display: flex;
    gap: 0.5rem;
}

.lgy-ac-lookup-row input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lgy-ac-lookup-row input:focus {
    outline: none;
    border-color: var(--lgy-accent, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.lgy-ac-btn-lookup {
    padding: 0.6rem 1.25rem;
    background: var(--lgy-accent, #0d6efd);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.lgy-ac-btn-lookup:hover {
    background: var(--lgy-accent-hover, #0b5ed7);
}

.lgy-ac-btn-lookup:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lgy-ac-vin-date {
    margin-top: 0.5rem;
}

.lgy-ac-vin-date label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.25rem;
}

.lgy-ac-vin-date input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 220px;
    box-sizing: border-box;
}

.lgy-ac-vin-date input:focus {
    outline: none;
    border-color: var(--lgy-accent, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.lgy-ac-lookup-msg {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.25em;
}

.lgy-ac-lookup-msg.success {
    color: #059669;
}

.lgy-ac-lookup-msg.error {
    color: #dc2626;
}

.lgy-ac-lookup-msg.loading {
    color: #6b7280;
}

/* Divider */
.lgy-ac-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    gap: 1rem;
}

.lgy-ac-divider::before,
.lgy-ac-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.lgy-ac-divider span {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Form Grid */
.lgy-ac-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lgy-ac-field {
    display: flex;
    flex-direction: column;
}

.lgy-ac-field-full {
    grid-column: 1 / -1;
}

.lgy-ac-field label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #374151;
}

.lgy-ac-field label .req {
    color: #dc3545;
}

.lgy-ac-field select,
.lgy-ac-field input {
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.lgy-ac-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.lgy-ac-field select:focus,
.lgy-ac-field input:focus {
    outline: none;
    border-color: var(--lgy-accent, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.lgy-ac-field select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.lgy-ac-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.lgy-ac-field .lgy-ac-error-field {
    border-color: #dc3545;
}

/* Buttons */
.lgy-ac-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

.lgy-ac-btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lgy-ac-btn-next,
.lgy-ac-btn-submit {
    background: var(--lgy-accent, #0d6efd);
    color: #fff;
    margin-left: auto;
}

.lgy-ac-btn-next:hover,
.lgy-ac-btn-submit:hover {
    background: var(--lgy-accent-hover, #0b5ed7);
    transform: translateY(-1px);
}

.lgy-ac-btn-back {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.lgy-ac-btn-back:hover {
    background: #f9fafb;
    color: #374151;
}

.lgy-ac-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
#lgy-ac-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.lgy-ac-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--lgy-accent, #0d6efd);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: lgy-spin 0.8s linear infinite;
}

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

#lgy-ac-loading p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Results */
.lgy-ac-results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lgy-ac-results-header h3 {
    margin-bottom: 0.25rem;
}

.lgy-ac-results-header .lgy-ac-car-name {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Moms Badge */
.lgy-ac-moms-badge-wrap {
    text-align: center;
    margin-bottom: 1.25rem;
}

.lgy-ac-moms-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lgy-ac-moms-badge.moms-dead {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.lgy-ac-moms-badge.moms-active {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.lgy-ac-moms-explain {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

/* Moms note */
.lgy-ac-moms-note {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0 0 1rem;
}

/* Price with moms */
.lgy-ac-card-moms {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.lgy-ac-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.lgy-ac-moms-warn {
    font-size: 0.7rem;
    color: #b45309;
    background: #fef3c7;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    margin-top: 0.35rem;
    display: inline-block;
}

.lgy-ac-value-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.lgy-ac-value-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}

.lgy-ac-value-card.primary {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
}

.lgy-ac-value-card .lgy-ac-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.lgy-ac-value-card .lgy-ac-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

.lgy-ac-value-card.primary .lgy-ac-card-value {
    color: var(--lgy-accent, #0d6efd);
}

.lgy-ac-value-single {
    text-align: center;
    margin-bottom: 1.5rem;
}

.lgy-ac-value-single .lgy-ac-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.lgy-ac-value-single .lgy-ac-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--lgy-accent, #0d6efd);
}

.lgy-ac-details {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.lgy-ac-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.lgy-ac-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.lgy-ac-detail-item .lgy-ac-detail-label {
    color: #6b7280;
}

.lgy-ac-detail-item .lgy-ac-detail-value {
    font-weight: 600;
    color: #1a1a2e;
}

.lgy-ac-disclaimer {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* Action Buttons */
.lgy-ac-action-btns {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.lgy-ac-btn-contact {
    background: var(--lgy-accent, #0d6efd);
    color: #fff;
}

.lgy-ac-btn-contact:hover {
    background: var(--lgy-accent-hover, #0b5ed7);
    transform: translateY(-1px);
}

.lgy-ac-btn-pdf {
    background: transparent;
    color: var(--lgy-accent, #0d6efd);
    border: 2px solid var(--lgy-accent, #0d6efd);
}

.lgy-ac-btn-pdf:hover {
    background: var(--lgy-accent, #0d6efd);
    color: #fff;
    transform: translateY(-1px);
}

/* Contact Modal */
.lgy-ac-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
}

.lgy-ac-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.lgy-ac-modal-content h4 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #1a1a2e;
    border: none;
    padding: 0;
}

.lgy-ac-modal-content p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
}

.lgy-ac-modal-content .lgy-ac-field {
    margin-bottom: 0.75rem;
}

.lgy-ac-modal-content .lgy-ac-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.25rem;
}

.lgy-ac-modal-content .lgy-ac-field input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.lgy-ac-modal-content .lgy-ac-field input:focus {
    outline: none;
    border-color: var(--lgy-accent, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.lgy-ac-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.75rem 0 0;
    cursor: pointer;
}

.lgy-ac-consent input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.lgy-ac-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.lgy-ac-modal-actions .lgy-ac-btn-submit {
    flex: 1;
}

/* Comparable Cars */
.lgy-ac-comparable {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.lgy-ac-comparable-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.25rem;
    border: none;
    padding: 0;
}

.lgy-ac-comparable-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
}

.lgy-ac-car-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    overflow: hidden;
}

.lgy-ac-car-card {
    display: block;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
}

.lgy-ac-car-card:hover {
    border-color: var(--lgy-accent, #0d6efd);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.lgy-ac-car-card:visited {
    color: inherit;
}

.lgy-ac-car-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.lgy-ac-car-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lgy-accent, #0d6efd);
}

.lgy-ac-car-card-flag {
    font-size: 1.1rem;
}

.lgy-ac-car-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.lgy-ac-car-card-variant {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.1rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lgy-ac-car-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.6rem;
}

.lgy-ac-tag {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    white-space: nowrap;
}

.lgy-ac-car-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.7rem;
    color: #9ca3af;
    gap: 0.3rem 0.5rem;
    min-width: 0;
}

.lgy-ac-car-card-dealer {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.lgy-ac-car-card-source {
    background: #e5e7eb;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.lgy-ac-car-card-seen {
    white-space: nowrap;
    flex-shrink: 0;
}

.lgy-ac-comparable-footer {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.lgy-ac-btn-search {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: var(--lgy-accent, #0d6efd);
    border: 2px solid var(--lgy-accent, #0d6efd);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.lgy-ac-btn-search:hover {
    background: var(--lgy-accent, #0d6efd);
    color: #fff;
    text-decoration: none;
}

.lgy-ac-btn-search-alt {
    border-color: #f37a1f;
    color: #f37a1f;
}

.lgy-ac-btn-search-alt:hover {
    background: #f37a1f;
    border-color: #f37a1f;
    color: #fff;
}


/* Error */
.lgy-ac-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    color: #dc2626;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .lgy-ac-row {
        grid-template-columns: 1fr;
    }

    .lgy-ac-value-cards {
        grid-template-columns: 1fr;
    }

    .lgy-ac-details-grid {
        grid-template-columns: 1fr;
    }

    .lgy-ac-car-grid {
        grid-template-columns: 1fr;
    }

    .lgy-ac-panel {
        padding: 1.25rem;
    }

    .lgy-ac-progress {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .lgy-ac-step-line {
        width: 20px;
    }

    .lgy-ac-step-label {
        display: none;
    }
}
