/**
 * GuideForms Frontend Styles
 *
 * Themeable via CSS custom properties
 */

/* CSS Variables - Defaults (can be overridden per guide) */
.guideforms-container {
    /* Colors */
    --gp-primary: #000000;
    --gp-secondary: #666666;
    --gp-background: #ffffff;
    --gp-text: #111111;
    --gp-text-muted: #6b7280;
    --gp-border: #e5e7eb;
    --gp-error: #dc2626;
    --gp-success: #16a34a;

    /* Spacing */
    --gp-button-radius: 8px;
    --gp-card-radius: 8px;

    /* Typography */
    --gp-font-family: inherit;

    /* Sizing */
    --gp-max-width: 800px;
}

/* Container */
.guideforms-container {
    font-family: var(--gp-font-family);
    color: var(--gp-text);
    background: var(--gp-background);
    max-width: var(--gp-max-width);
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

.guideforms-container *,
.guideforms-container *::before,
.guideforms-container *::after {
    box-sizing: border-box;
}

/* Loading */
.gp-guide-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.gp-guide-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gp-border);
    border-top-color: var(--gp-primary);
    border-radius: 50%;
    animation: gp-spin 0.8s linear infinite;
}

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

/* Progress Bar */
.gp-progress {
    margin-bottom: 32px;
}

.gp-progress-bar {
    height: 4px;
    background: var(--gp-border);
    border-radius: 2px;
    overflow: hidden;
}

.gp-progress-fill {
    height: 100%;
    background: var(--gp-primary);
    transition: width 0.3s ease;
}

.gp-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.gp-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gp-progress-step-dot {
    width: 10px;
    height: 10px;
    background: var(--gp-border);
    border-radius: 50%;
    transition: background 0.2s ease;
}

.gp-progress-step.completed .gp-progress-step-dot,
.gp-progress-step.active .gp-progress-step-dot {
    background: var(--gp-primary);
}

.gp-progress-step-label {
    font-size: 12px;
    color: var(--gp-text-muted);
}

.gp-progress-step.active .gp-progress-step-label {
    color: var(--gp-text);
    font-weight: 500;
}

/* Step Header */
.gp-step-header {
    text-align: center;
    margin-bottom: 32px;
}

.gp-step-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--gp-text);
}

.gp-step-helper {
    font-size: 16px;
    color: var(--gp-text-muted);
    margin: 0;
}

/* Cards Step */
.gp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.gp-cards-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gp-cards-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gp-cards-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gp-card {
    position: relative;
    padding: 20px;
    background: var(--gp-background);
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-card-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.gp-card:hover {
    border-color: var(--gp-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gp-card.selected {
    border-color: var(--gp-primary);
    background: rgba(0, 0, 0, 0.02);
}

.gp-card-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--gp-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.gp-card.selected .gp-card-check {
    opacity: 1;
    transform: scale(1);
}

.gp-card-check svg {
    width: 14px;
    height: 14px;
    color: white;
}

.gp-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: calc(var(--gp-card-radius) - 2px);
    margin-bottom: 12px;
}

.gp-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.gp-card-label {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--gp-text);
}

.gp-card-description {
    font-size: 14px;
    color: var(--gp-text-muted);
    margin: 0;
}

/* Slider Step */
.gp-slider-container {
    padding: 20px 0;
    margin-bottom: 32px;
}

.gp-slider-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gp-slider-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--gp-text);
}

.gp-slider-range-separator {
    color: var(--gp-text-muted);
}

.gp-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--gp-border);
    border-radius: 4px;
    outline: none;
}

.gp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--gp-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gp-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.gp-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--gp-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.gp-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gp-text-muted);
}

/* Lead Form Step */
.gp-form {
    max-width: 400px;
    margin: 0 auto 32px;
}

.gp-form-field {
    margin-bottom: 20px;
}

.gp-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gp-text);
}

.gp-form-label .required {
    color: var(--gp-error);
}

.gp-form-input,
.gp-form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--gp-font-family);
    font-size: 16px;
    color: var(--gp-text);
    background: var(--gp-background);
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-button-radius);
    transition: border-color 0.2s ease;
}

.gp-form-input:focus,
.gp-form-textarea:focus {
    outline: none;
    border-color: var(--gp-primary);
}

.gp-form-input.error,
.gp-form-textarea.error {
    border-color: var(--gp-error);
}

.gp-form-error {
    font-size: 12px;
    color: var(--gp-error);
    margin-top: 4px;
}

.gp-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.gp-form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.gp-form-checkbox label {
    font-size: 14px;
    color: var(--gp-text);
    cursor: pointer;
}

/* Result Count */
.gp-result-count {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--gp-card-radius);
    margin-bottom: 24px;
}

.gp-result-count-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--gp-primary);
}

.gp-result-count-text {
    font-size: 14px;
    color: var(--gp-text-muted);
}

/* Navigation */
.gp-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.gp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--gp-font-family);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--gp-button-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.gp-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gp-button-primary {
    background: var(--gp-primary);
    color: white;
}

.gp-button-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.gp-button-secondary {
    background: transparent;
    color: var(--gp-text);
    border: 2px solid var(--gp-border);
}

.gp-button-secondary:hover:not(:disabled) {
    border-color: var(--gp-secondary);
}

.gp-button-link {
    background: transparent;
    color: var(--gp-text-muted);
    padding: 14px 16px;
}

.gp-button-link:hover {
    color: var(--gp-text);
}

/* Results */
.gp-results {
    margin-top: 40px;
}

.gp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.gp-results-count {
    font-size: 14px;
    color: var(--gp-text-muted);
}

.gp-results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-results-sort label {
    font-size: 14px;
    color: var(--gp-text-muted);
}

.gp-results-sort select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-button-radius);
    background: var(--gp-background);
}

.gp-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gp-result-card {
    background: var(--gp-background);
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-card-radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.gp-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.gp-result-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.gp-result-card-body {
    padding: 16px;
}

.gp-result-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--gp-text);
}

.gp-result-card-title a {
    color: inherit;
    text-decoration: none;
}

.gp-result-card-title a:hover {
    color: var(--gp-primary);
}

.gp-result-card-excerpt {
    font-size: 14px;
    color: var(--gp-text-muted);
    margin: 0 0 12px;
    line-height: 1.5;
}

.gp-result-card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--gp-text-muted);
    margin-bottom: 12px;
}

.gp-result-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--gp-primary);
    margin-bottom: 12px;
}

.gp-result-card-cta {
    display: block;
    width: 100%;
    text-align: center;
}

/* No Results */
.gp-no-results {
    text-align: center;
    padding: 48px 24px;
}

.gp-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.gp-no-results-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.gp-no-results-text {
    font-size: 14px;
    color: var(--gp-text-muted);
    margin: 0 0 24px;
}

/* Summary */
.gp-summary {
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--gp-card-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.gp-summary-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
}

.gp-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gp-summary-item {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gp-background);
    border: 1px solid var(--gp-border);
    border-radius: 100px;
    font-size: 13px;
}

/* Load More */
.gp-load-more {
    text-align: center;
    margin-top: 32px;
}

/* Start Over */
.gp-start-over {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--gp-border);
}

/* Error State */
.guideforms-error {
    padding: 24px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    color: var(--gp-error);
    text-align: center;
}

/* ============================================
   Preact Frontend Component Styles
   ============================================ */

/* Guide Wrapper - Outermost container with background */
.guide-wrapper {
    position: relative;
    padding: 60px 40px;
    box-sizing: border-box;
}

.guide-wrapper *,
.guide-wrapper *::before,
.guide-wrapper *::after {
    box-sizing: border-box;
}

.guide-wrapper-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-wrapper-bg {
    pointer-events: none;
}

/* Layout Variants - affects the outer wrapper container */

/* Full Width: Breaks out of theme container, spans entire viewport */
.guide-layout-fullWidth {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
}

/* Boxed: Standard width, optional background card styling */
.guide-layout-boxed {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
}

/* Guide Header - Outside the card */
.guide-wrapper .guide-header {
    padding: 0 0 32px;
    text-align: center;
}

.guide-wrapper .guide-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--guide-text);
    line-height: 1.3;
}

.guide-wrapper .guide-subtitle {
    font-size: 1rem;
    color: var(--guide-text);
    opacity: 0.7;
    margin: 0;
    line-height: 1.5;
}

/* Guide Container (Preact) */
.guide-container {
    --guide-primary: #000000;
    --guide-bg: #ffffff;
    --guide-text: #1a1a1a;
    --guide-border: #e5e5e5;
    --guide-radius: 8px;

    font-family: inherit;
    color: var(--guide-text);
    box-sizing: border-box;
}

/* Card Wrapper - Main step card (always white with border and shadow) */
.guide-card-wrapper {
    background: #ffffff;
    border: 1px solid var(--guide-border);
    border-radius: calc(var(--guide-radius) + 4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

/* Progress (Preact) - At top of card */
.guide-progress {
    padding: 0;
    margin: 0;
}

.guide-progress-info {
    display: none;
}

.guide-progress-bar {
    height: 6px;
    background: var(--guide-border);
    border-radius: 0;
    overflow: hidden;
}

.guide-progress-fill {
    height: 100%;
    background: var(--guide-primary);
    transition: width 0.3s ease;
}

/* Step Container */
.guide-step-container {
    padding: 40px 48px 32px;
}

.guide-step {
    animation: guide-fadeIn 0.3s ease;
}

@keyframes guide-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guide-step-header {
    text-align: center;
    margin-bottom: 24px;
}

.guide-step-title {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 8px;
    color: var(--guide-text);
}

.guide-step-description {
    font-size: 15px;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

.guide-step-subtitle {
    font-size: 15px;
    color: var(--guide-text);
    opacity: 0.7;
    text-align: center;
    margin: 0;
}

/* Info Link */
.guide-step-info {
    text-align: center;
    margin-top: 24px;
}

.guide-info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.guide-info-link::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.guide-info-link:hover {
    color: #6b7280;
}

.guide-info-link:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Info Modal */
.guide-modal-overlay {
    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: 999999;
    padding: 20px;
}

.guide-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: guide-modalFadeIn 0.2s ease;
}

@keyframes guide-modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.guide-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.guide-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #111;
}

.guide-modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.guide-modal-close:hover {
    background: #f3f4f6;
    color: #111;
}

.guide-modal-content {
    padding: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.guide-modal-content p {
    margin: 0;
}

/* Cards Grid (Preact) */
.guide-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    perspective: 800px;
}

.guide-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 10.5rem;
    padding: 16px 12px;
    background: var(--guide-bg);
    border: 2px solid var(--guide-border);
    border-radius: var(--guide-radius);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
    text-align: center;
    outline: none;
}

.guide-card:hover {
    transform: scale(1.015) translateZ(20px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    background: var(--guide-bg);
}

.guide-card:focus {
    outline: none;
    background: var(--guide-bg);
}

.guide-card:focus-visible {
    outline: none;
    border-color: var(--guide-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.guide-card-selected {
    border-color: var(--guide-primary);
    background: rgba(0, 0, 0, 0.02);
}

/* Card image */
.guide-card-image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.guide-card-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    object-position: center center;
    border-radius: calc(var(--guide-radius) - 4px);
}

/* Card content (centered) */
.guide-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.guide-card-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--guide-text);
}

.guide-card-desc {
    display: block;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.guide-card-count {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 2px;
}

.guide-card-count-skeleton {
    width: 32px;
    height: 14px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 0 auto;
    animation: guide-skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes guide-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Disabled card */
.guide-card-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.guide-card-disabled:hover {
    border-color: var(--guide-border);
    box-shadow: none;
}

/* Selection indicator (radio/checkbox) */
.guide-card-indicator {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    transform: translateZ(0);
}

.guide-indicator-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--guide-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    background: var(--guide-bg);
    transform-style: flat;
}

/* Radio style (circle) */
.guide-card-radio .guide-indicator-box {
    border-radius: 50%;
}

.guide-card-radio .guide-indicator-selected {
    border-color: var(--guide-primary);
}

.guide-radio-dot {
    width: 10px;
    height: 10px;
    background: var(--guide-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Checkbox style (square) */
.guide-card-checkbox .guide-indicator-box {
    border-radius: 4px;
}

.guide-card-checkbox .guide-indicator-selected {
    border-color: var(--guide-primary);
    background: var(--guide-primary);
    color: white;
}

/* Hide old check style (not used anymore) */
.guide-card-check {
    display: none;
}

.guide-match-hint {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 16px 0 0;
}

/* Match Count Badge */
.guide-match-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--guide-radius);
    text-align: center;
}

.guide-match-count-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--guide-primary);
}

.guide-match-count-text {
    font-size: 14px;
    color: #6b7280;
}

/* Slider (Preact) - noUiSlider customization */
.guide-slider-value {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-top: 20px;
    color: var(--guide-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.guide-slider-container {
    height: 8px;
    margin: 16px 0;
}

/* noUiSlider overrides - using !important to ensure override */
.guide-container .noUi-target,
.guide-step-slider .noUi-target {
    background: #e5e7eb !important;
    border: none !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
    height: 8px !important;
}

.guide-container .noUi-connect,
.guide-step-slider .noUi-connect {
    background: var(--guide-primary) !important;
    border-radius: 9999px !important;
}

.guide-container .noUi-horizontal .noUi-handle,
.guide-step-slider .noUi-horizontal .noUi-handle {
    width: 24px !important;
    height: 24px !important;
    top: -8px !important;
    right: -12px !important;
    border: 2px solid var(--guide-primary) !important;
    border-radius: 50% !important;
    background: white !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    cursor: grab !important;
    transition: box-shadow 0.15s ease, transform 0.15s ease !important;
}

.guide-container .noUi-handle::before,
.guide-container .noUi-handle::after,
.guide-step-slider .noUi-handle::before,
.guide-step-slider .noUi-handle::after {
    display: none !important;
}

.guide-container .noUi-handle:hover,
.guide-step-slider .noUi-handle:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.08) !important;
}

.guide-container .noUi-handle:active,
.guide-step-slider .noUi-handle:active {
    cursor: grabbing !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
    transform: scale(1.12) !important;
}

.guide-container .noUi-handle:focus,
.guide-step-slider .noUi-handle:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.guide-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-top: 16px;
}

/* Slider Decorative Images */
.guide-slider-images {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.guide-slider-images-center {
    justify-content: center;
}

.guide-slider-image {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .guide-slider-images {
        gap: 8px;
        padding: 0;
    }

    .guide-slider-image {
        max-width: 60px;
        max-height: 45px;
    }
}

/* Slider Skeleton */
.guide-slider-skeleton {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.guide-slider-skeleton-value {
    width: 120px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 6px;
    animation: guide-skeleton-pulse 1.5s ease-in-out infinite;
}

.guide-slider-skeleton-track {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    position: relative;
    animation: guide-skeleton-pulse 1.5s ease-in-out infinite;
}

.guide-slider-skeleton-handle {
    position: absolute;
    top: -8px;
    left: 40%;
    width: 24px;
    height: 24px;
    background: #d1d5db;
    border-radius: 50%;
    animation: guide-skeleton-pulse 1.5s ease-in-out infinite;
}

.guide-slider-skeleton-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.guide-slider-skeleton-labels span {
    width: 48px;
    height: 14px;
    background: #e5e7eb;
    border-radius: 4px;
    animation: guide-skeleton-pulse 1.5s ease-in-out infinite;
}

/* Lead Form (Preact) */
.guide-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.guide-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.guide-required {
    color: #dc2626;
    margin-left: 2px;
}

.guide-input,
.guide-form textarea,
.guide-form select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--guide-border);
    border-radius: var(--guide-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-input:focus,
.guide-form textarea:focus,
.guide-form select:focus,
.guide-input:active,
.guide-form textarea:active,
.guide-form select:active {
    outline: none;
    border-color: var(--guide-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.guide-input-error {
    border-color: #dc2626;
}

.guide-input-error:focus,
.guide-input-error:active {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.guide-error {
    display: block;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}

.guide-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}

.guide-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--guide-primary);
}

.guide-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}

.guide-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--guide-primary);
}

.guide-radio-group-label,
.guide-checkbox-group-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--guide-text);
}

.guide-radio-group,
.guide-checkbox-group {
    margin-bottom: 4px;
}

.guide-privacy {
    font-size: 12px;
    color: #6b7280;
    margin: 16px 0;
}

.guide-privacy-label {
    margin-bottom: 12px;
}

.guide-privacy-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--guide-primary);
}

.guide-btn-submit {
    width: 100%;
    margin-top: 8px;
}

/* Navigation (Preact) */
.guide-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 48px 24px;
    border-top: 1px solid var(--guide-border);
}

/* Watermark */
.guide-watermark {
    display: block;
    text-align: right;
    padding: 8px 16px 10px;
    font-size: 11px;
    color: #adb5bd;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.guide-watermark:hover {
    color: #868e96;
    text-decoration: none;
}

.guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--guide-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.guide-btn:focus {
    outline: none;
}

.guide-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.guide-btn-primary {
    background: var(--guide-primary);
    color: white;
    border: 2px solid var(--guide-primary);
}

.guide-btn-primary:hover:not(:disabled),
.guide-btn-primary:focus:not(:disabled) {
    background: var(--guide-primary);
    border-color: var(--guide-primary);
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.guide-btn-primary:focus-visible:not(:disabled) {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.guide-btn-secondary {
    background: var(--guide-bg);
    color: var(--guide-text);
    border: 2px solid var(--guide-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.guide-btn-secondary:hover:not(:disabled),
.guide-btn-secondary:focus:not(:disabled) {
    background: var(--guide-bg);
    border-color: var(--guide-primary);
    color: var(--guide-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.guide-btn-secondary:focus-visible:not(:disabled) {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.guide-btn-ghost {
    background: transparent;
    color: #6b7280;
}

.guide-btn-ghost:hover:not(:disabled) {
    color: var(--guide-text);
}

/* Results (Preact) */
.guide-results {
    animation: guide-fadeIn 0.3s ease;
}

.guide-results-header {
    text-align: center;
    margin-bottom: 24px;
}

.guide-results-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
}

.guide-results-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.guide-results-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.guide-result-card {
    display: block;
    background: var(--guide-bg);
    border: 1px solid var(--guide-border);
    border-radius: var(--guide-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.guide-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.guide-result-image {
    padding: 16px;
    background: #f9fafb;
}

.guide-result-image img {
    width: 100%;
    height: 160px;
    object-fit: contain;
}

.guide-result-content {
    padding: 16px;
}

.guide-result-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.guide-result-excerpt {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.5;
}

.guide-result-price {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.guide-price-original {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 8px;
    font-weight: 400;
}

.guide-price-current {
    color: var(--guide-primary);
}

.guide-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

/* Meta Data Grid */
.guide-result-meta-grid {
    margin-top: 12px;
}

.guide-result-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--guide-border);
}

.guide-result-meta-row:last-child {
    border-bottom: none;
}

.guide-result-meta-label {
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
    margin-right: 12px;
}

.guide-result-meta-value {
    color: var(--guide-text);
    text-align: right;
}

/* Result CTA Button */
.guide-result-cta {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    text-align: center;
    background: var(--guide-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--guide-radius) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-result-cta:hover,
.guide-result-cta:focus {
    background: var(--guide-primary) !important;
    color: white !important;
    filter: brightness(1.15);
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.guide-result-cta:visited {
    color: white !important;
}

/* List Layout */
.guide-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 auto 24px;
    max-width: 780px;
}

.guide-results-list .guide-result-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.guide-results-list .guide-result-image {
    flex-shrink: 0;
    width: 200px;
    padding: 16px;
    background: #f9fafb;
}

.guide-results-list .guide-result-image img {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: contain;
}

.guide-results-list .guide-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.guide-results-list .guide-result-meta-grid {
    width: 50%;
}

.guide-results-list .guide-result-cta {
    position: absolute;
    bottom: 16px;
    right: 16px;
    margin-top: 0;
}

/* Load More Button */
.guide-results-load-more {
    text-align: center;
    margin: 24px 0;
}

.guide-results-empty {
    text-align: center;
    padding: 48px 24px;
}

.guide-results-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.guide-pagination-info {
    font-size: 14px;
    color: #6b7280;
}

.guide-results-actions {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--guide-border);
}

/* Responsive */
@media (max-width: 768px) {
    .guide-wrapper {
        padding: 40px 20px;
    }

    .guideforms-container,
    .guide-container {
        padding: 12px;
    }

    .guide-wrapper .guide-header {
        padding: 0 0 24px;
    }

    .guide-wrapper .guide-title {
        font-size: 1.5rem;
    }

    .guide-step-container {
        padding: 24px 20px 16px;
    }

    .guide-navigation {
        padding: 12px 20px 20px;
    }

    .gp-step-title,
    .guide-step-title {
        font-size: 18px;
    }

    .gp-cards-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .gp-cards-grid.columns-3,
    .gp-cards-grid.columns-4 {
        grid-template-columns: 1fr;
    }

    .gp-navigation,
    .guide-navigation {
        flex-wrap: wrap;
    }

    .gp-results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .guide-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .guide-results-list .guide-result-card {
        flex-direction: column;
    }

    .guide-results-list .guide-result-image {
        width: 100%;
    }

    .guide-results-list .guide-result-image img {
        height: 160px;
        min-height: auto;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .gp-cards-grid,
    .gp-cards-grid.columns-2,
    .gp-cards-grid.columns-3,
    .gp-cards-grid.columns-4 {
        grid-template-columns: 1fr;
    }

    .gp-results-grid,
    .guide-results-grid {
        grid-template-columns: 1fr;
    }
}
