/**
 * Kitces Widget Manager - Frontend Widget Styles
 */

/* Base Widget */
.kwm-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    box-sizing: border-box;
    position: relative;
}

.kwm-widget *,
.kwm-widget *::before,
.kwm-widget *::after {
    box-sizing: border-box;
}

.kwm-widget--inline {
    margin: 24px 0;
}

/* Close Button */
.kwm-widget__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    z-index: 10;
}

.kwm-widget__close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Overlay - Centered popup (default) */
.kwm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.kwm-overlay--popup {
    display: flex;
}

.kwm-overlay .kwm-widget {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Positioned popup overlays (corner popups) */
.kwm-overlay--positioned {
    background: transparent;
    pointer-events: none;
}

.kwm-overlay--positioned .kwm-widget {
    pointer-events: auto;
    position: fixed;
    max-width: 400px;
    width: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.kwm-overlay--positioned .kwm-widget--bottom-right {
    bottom: 20px;
    right: 20px;
}

.kwm-overlay--positioned .kwm-widget--bottom-left {
    bottom: 20px;
    left: 20px;
}

.kwm-overlay--positioned .kwm-widget--top-right {
    top: 20px;
    right: 20px;
}

.kwm-overlay--positioned .kwm-widget--top-left {
    top: 20px;
    left: 20px;
}

/* Center position (default behavior) */
.kwm-overlay--positioned .kwm-widget--center {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
}

/* Floating Positions */
.kwm-widget--floating,
.kwm-widget--slide_in {
    position: fixed;
    z-index: 999998;
    max-width: 380px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.kwm-widget--bottom-right {
    bottom: 20px;
    right: 20px;
}

.kwm-widget--bottom-left {
    bottom: 20px;
    left: 20px;
}

.kwm-widget--top-right {
    top: 20px;
    right: 20px;
}

.kwm-widget--top-left {
    top: 20px;
    left: 20px;
}

/* ===== RATING WIDGET ===== */
.kwm-widget .kwm-rating {
    --kwm-btn-size: 40px;
    --kwm-accent: #f59e0b;
    --kwm-accent-light: #fef3c7;
    --kwm-transition: 0.2s ease;

    text-align: center;
    padding: 32px 24px;
    background: #fff;
    border-radius: 12px;
}

.kwm-widget--inline .kwm-rating {
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    max-width: 500px;
    margin: 32px auto;
}

/* Hide close button on inline widgets */
.kwm-widget--inline .kwm-widget__close {
    display: none;
}

.kwm-widget .kwm-rating__question {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

.kwm-widget .kwm-rating__stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

/* Rating button – clean, no border */
.kwm-widget .kwm-rating__btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    position: relative;
    transition: all var(--kwm-transition);
    width: var(--kwm-btn-size);
    height: var(--kwm-btn-size);
    min-width: var(--kwm-btn-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    overflow: visible;
    font-family: inherit;
    line-height: 1;
}

/* Remove any theme ::before / ::after on buttons */
.kwm-widget .kwm-rating__btn::before,
.kwm-widget .kwm-rating__btn::after {
    display: none;
}

.kwm-widget .kwm-rating__btn:hover {
    transform: scale(1.1);
}

.kwm-widget .kwm-rating__btn:active {
    transform: scale(0.95);
}

/* Icon states – absolutely positioned, stacked */
.kwm-widget .kwm-rating__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--kwm-transition);
}

.kwm-widget .kwm-rating__icon--empty {
    opacity: 1;
}

.kwm-widget .kwm-rating__icon--filled {
    opacity: 0;
}

/* Hover: hide empty, show filled (for all stars up to hovered one) */
.kwm-widget .kwm-rating__btn--hovered .kwm-rating__icon--empty,
.kwm-widget .kwm-rating__btn:hover .kwm-rating__icon--empty {
    opacity: 0;
}

.kwm-widget .kwm-rating__btn--hovered .kwm-rating__icon--filled,
.kwm-widget .kwm-rating__btn:hover .kwm-rating__icon--filled {
    opacity: 1;
}

/* Selected/active state - no extra styling needed, icon handles it */
.kwm-widget .kwm-rating__btn--active {
    /* Icon color change handled by icon rules below */
}

.kwm-widget .kwm-rating__btn--active .kwm-rating__icon--empty {
    opacity: 0;
}

.kwm-widget .kwm-rating__btn--active .kwm-rating__icon--filled {
    opacity: 1;
}

/* SVG icons */
.kwm-widget .kwm-rating__icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.kwm-widget .kwm-rating__icon-svg svg {
    width: 100%;
    height: 100%;
}

.kwm-widget .kwm-rating__icon--empty .kwm-rating__icon-svg {
    color: #94a3b8;
}

.kwm-widget .kwm-rating__icon--filled .kwm-rating__icon-svg {
    color: var(--kwm-accent);
}

/* Emoji icons */
.kwm-widget .kwm-rating__icon-emoji {
    font-size: calc(var(--kwm-btn-size) * 0.55);
    line-height: 1;
}

/* Image icons (custom uploads) */
.kwm-widget .kwm-rating__icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kwm-widget .kwm-rating__icon--empty .kwm-rating__icon-img {
    opacity: 0.15;
}

/* Number icons */
.kwm-widget .kwm-rating__icon-number {
    font-size: calc(var(--kwm-btn-size) * 0.38);
    font-weight: 700;
    line-height: 1;
}

.kwm-widget .kwm-rating__icon--empty .kwm-rating__icon-number {
    color: #94a3b8;
}

.kwm-widget .kwm-rating__icon--filled .kwm-rating__icon-number {
    color: #92400e;
}

/* Subtitle & description (below icons) */
.kwm-widget .kwm-rating__subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-top: 16px;
    line-height: 1.5;
}

.kwm-widget .kwm-rating__description {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.6;
}

/* Thank you */
.kwm-widget .kwm-rating__message {
    margin-top: 20px;
    padding: 10px 16px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    display: inline-block;
}

/* Already rated state - more subtle */
.kwm-widget--rated .kwm-rating__message {
    background: #f0f6fc;
    color: #1e40af;
    font-weight: 500;
    font-size: 13px;
}


/* Rating responsive */
@media (max-width: 480px) {
    .kwm-widget .kwm-rating {
        --kwm-btn-size: 36px;
        padding: 24px 16px;
    }

    .kwm-widget .kwm-rating__stars {
        gap: 6px;
    }

    .kwm-widget .kwm-rating__question {
        font-size: 16px;
    }
}

@media (min-width: 481px) and (max-width: 600px) {
    .kwm-widget .kwm-rating {
        --kwm-btn-size: 42px;
    }
}

/* ===== NEWSLETTER WIDGET ===== */
.kwm-newsletter {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

.kwm-newsletter__headline {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.kwm-newsletter__description {
    color: #666;
    margin: 0 0 16px;
    font-size: 14px;
}

.kwm-newsletter__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kwm-newsletter__input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s;
}

.kwm-newsletter__input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.kwm-newsletter__submit {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.kwm-newsletter__submit:hover {
    background: #135e96;
}

.kwm-newsletter__success {
    text-align: center;
    padding: 20px;
    color: #27ae60;
    font-weight: 600;
}

.kwm-newsletter__error {
    color: #e74c3c;
    font-size: 13px;
}

/* ===== PROMO WIDGET ===== */
.kwm-promo {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.kwm-promo--horizontal {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kwm-promo--horizontal .kwm-promo__image {
    flex-shrink: 0;
    width: 40%;
}

.kwm-promo__image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.kwm-promo--vertical .kwm-promo__image {
    margin: -24px -24px 16px;
}

.kwm-promo--vertical .kwm-promo__image img {
    border-radius: 8px 8px 0 0;
}

.kwm-promo__headline {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.kwm-promo__subheadline {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px;
}

.kwm-promo__description {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
}

.kwm-promo__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.kwm-promo__cta {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
}

.kwm-promo__cta:hover {
    opacity: 0.9;
}

.kwm-promo__cta--primary {
    background: #2271b1;
    color: #fff;
}

.kwm-promo__cta--secondary {
    background: transparent;
    color: #2271b1;
    border: 1px solid #2271b1;
}

/* ===== SURVEY WIDGET ===== */
.kwm-survey {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

.kwm-survey__title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.kwm-survey__description {
    color: #666;
    margin: 0 0 16px;
    font-size: 14px;
}

.kwm-survey__progress {
    margin-bottom: 16px;
}

.kwm-survey__progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 4px;
}

.kwm-survey__progress-fill {
    height: 100%;
    background: #2271b1;
    border-radius: 2px;
    transition: width 0.3s;
}

.kwm-survey__progress-text {
    font-size: 12px;
    color: #888;
}

.kwm-survey__label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.kwm-survey__required {
    color: #e74c3c;
}

.kwm-survey__input,
.kwm-survey__textarea,
.kwm-survey__select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.kwm-survey__input:focus,
.kwm-survey__textarea:focus,
.kwm-survey__select:focus {
    outline: none;
    border-color: #2271b1;
}

.kwm-survey__options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kwm-survey__option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
}

.kwm-survey__option:hover {
    background: #f5f5f5;
}

.kwm-survey__rating-scale {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.kwm-survey__rating-options {
    display: flex;
    gap: 4px;
}

.kwm-survey__rating-option {
    cursor: pointer;
}

.kwm-survey__rating-option input {
    display: none;
}

.kwm-survey__rating-option span {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 50%;
    font-weight: 600;
    transition: all 0.15s;
}

.kwm-survey__rating-option input:checked + span,
.kwm-survey__rating-option:hover span {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.kwm-survey__rating-label {
    font-size: 12px;
    color: #888;
}

.kwm-survey__actions {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    gap: 8px;
}

.kwm-survey__prev,
.kwm-survey__next,
.kwm-survey__submit {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.kwm-survey__prev {
    background: #f0f0f0;
    color: #333;
}

.kwm-survey__next {
    background: #2271b1;
    color: #fff;
    margin-left: auto;
}

.kwm-survey__submit {
    background: #27ae60;
    color: #fff;
    margin-left: auto;
}

.kwm-survey__success {
    text-align: center;
    padding: 20px;
    color: #27ae60;
    font-weight: 600;
}

/* ===== CUSTOM HTML WIDGET ===== */
.kwm-custom-html {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

.kwm-custom-html__title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
}

/* ===== SPINNER ===== */
.kwm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: kwm-spin 0.6s linear infinite;
}

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

/* ===== CONTENT MAX WIDTH ===== */
.kwm-widget .kwm-rating,
.kwm-widget .kwm-newsletter,
.kwm-widget .kwm-promo,
.kwm-widget .kwm-survey,
.kwm-widget .kwm-custom-html {
    max-width: var(--kwm-content-max-width, none);
    margin-left: auto;
    margin-right: auto;
}

/* ===== DEVICE VISIBILITY ===== */
/* Desktop: > 1024px */
@media (min-width: 1025px) {
    .kwm-hide-desktop {
        display: none !important;
    }
}

/* Tablet: 481px - 1024px */
@media (min-width: 481px) and (max-width: 1024px) {
    .kwm-hide-tablet {
        display: none !important;
    }
}

/* Mobile: <= 480px */
@media (max-width: 480px) {
    .kwm-hide-mobile {
        display: none !important;
    }
}

/* ===== RESPONSIVE ===== */
/* Tablet */
@media (max-width: 1024px) {
    .kwm-widget--floating,
    .kwm-widget--slide_in {
        max-width: 350px;
    }

    .kwm-overlay .kwm-widget {
        max-width: 90%;
        width: 500px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .kwm-widget--floating,
    .kwm-widget--slide_in {
        max-width: calc(100% - 20px);
        left: 10px;
        right: 10px;
    }

    .kwm-widget--bottom-right,
    .kwm-widget--bottom-left {
        bottom: 10px;
    }

    .kwm-widget--top-right,
    .kwm-widget--top-left {
        top: 10px;
    }

    .kwm-overlay .kwm-widget {
        max-width: 95%;
        width: auto;
        margin: 10px;
    }

    .kwm-promo--horizontal {
        flex-direction: column;
    }

    .kwm-promo--horizontal .kwm-promo__image {
        width: 100%;
    }

    /* Smaller padding on mobile */
    .kwm-widget .kwm-rating,
    .kwm-widget .kwm-newsletter,
    .kwm-widget .kwm-promo,
    .kwm-widget .kwm-survey,
    .kwm-widget .kwm-custom-html {
        padding: 20px 16px;
    }
}

/* ================================================
   ONBOARDING WIDGET
   ================================================ */

.kwm-onboarding {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Progress Bar */
.kwm-onboarding__progress {
    margin-bottom: 24px;
}

.kwm-onboarding__progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.kwm-onboarding__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.kwm-onboarding__progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
}

.kwm-onboarding__progress-percent {
    font-weight: 600;
    color: #6366f1;
}

/* Steps */
.kwm-onboarding__step {
    animation: kwm-fadeIn 0.3s ease;
}

.kwm-onboarding__step-image {
    text-align: center;
    margin-bottom: 20px;
}

.kwm-onboarding__step-image img {
    max-width: 200px;
    height: auto;
    border-radius: 12px;
}

.kwm-onboarding__step-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.kwm-onboarding__step-content {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
}

.kwm-onboarding__step-content p {
    margin: 0 0 12px 0;
}

.kwm-onboarding__step-content p:last-child {
    margin-bottom: 0;
}

.kwm-onboarding__step-content h1,
.kwm-onboarding__step-content h2,
.kwm-onboarding__step-content h3 {
    color: #1f2937;
    margin: 16px 0 8px 0;
    line-height: 1.3;
}

.kwm-onboarding__step-content h1 { font-size: 28px; }
.kwm-onboarding__step-content h2 { font-size: 22px; }
.kwm-onboarding__step-content h3 { font-size: 18px; }

.kwm-onboarding__step-content ul,
.kwm-onboarding__step-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.kwm-onboarding__step-content li {
    margin-bottom: 6px;
}

.kwm-onboarding__step-content a {
    color: #6366f1;
    text-decoration: underline;
}

.kwm-onboarding__step-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

/* Content Button (CTA button inserted via editor) */
.kwm-onboarding__step-content .kwm-content-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 16px 0;
}

.kwm-onboarding__step-content .kwm-content-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: #fff !important;
}

/* CE Collection Form */
.kwm-onboarding__ce-collection {
    margin-top: 20px;
}

.kwm-onboarding__ce-intro {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.kwm-onboarding__ce-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.kwm-onboarding__ce-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kwm-onboarding__ce-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.kwm-onboarding__ce-input {
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kwm-onboarding__ce-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.kwm-onboarding__ce-input:not(:placeholder-shown) {
    border-color: #10b981;
    background: #f0fdf4;
}

.kwm-onboarding__ce-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 16px;
}

.kwm-onboarding__ce-submit {
    width: 100%;
    justify-content: center;
}

/* Question Options */
.kwm-onboarding__question {
    margin-top: 20px;
}

.kwm-onboarding__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kwm-onboarding__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kwm-onboarding__option:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.kwm-onboarding__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kwm-onboarding__option-box {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.kwm-onboarding__options--checkbox .kwm-onboarding__option-box {
    border-radius: 6px;
}

.kwm-onboarding__option-check {
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.kwm-onboarding__options--checkbox .kwm-onboarding__option-check {
    border-radius: 2px;
    width: 12px;
    height: 12px;
}

.kwm-onboarding__option input:checked + .kwm-onboarding__option-box {
    border-color: #6366f1;
}

.kwm-onboarding__option input:checked + .kwm-onboarding__option-box .kwm-onboarding__option-check {
    transform: scale(1);
}

.kwm-onboarding__option-label {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

/* Text inputs */
.kwm-onboarding__input,
.kwm-onboarding__textarea,
.kwm-onboarding__select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.kwm-onboarding__input:focus,
.kwm-onboarding__textarea:focus,
.kwm-onboarding__select:focus {
    outline: none;
    border-color: #6366f1;
}

/* Action Button */
.kwm-onboarding__action {
    margin-top: 20px;
}

.kwm-onboarding__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kwm-onboarding__action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: #fff;
}

.kwm-onboarding__action-btn svg {
    width: 20px;
    height: 20px;
}

/* External Check */
.kwm-onboarding__external-check {
    margin-top: 20px;
}

.kwm-onboarding__check-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 15px;
    color: #4b5563;
}

.kwm-onboarding__check-status--complete {
    background: #ecfdf5;
    color: #047857;
}

.kwm-onboarding__check-complete-icon {
    width: 24px;
    height: 24px;
    color: #10b981;
}

/* Checklist (sidebar style) */
.kwm-onboarding__checklist {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.kwm-onboarding__checklist-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.kwm-onboarding__checklist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kwm-onboarding__checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.kwm-onboarding__checklist-item.kwm-active {
    color: #1f2937;
    font-weight: 500;
}

.kwm-onboarding__checklist-item.kwm-completed {
    color: #10b981;
}

.kwm-onboarding__checklist-item.kwm-completed .kwm-onboarding__check-label {
    text-decoration: line-through;
    opacity: 0.7;
}

.kwm-onboarding__check-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kwm-onboarding__checklist-item.kwm-active .kwm-onboarding__check-icon {
    border-color: #6366f1;
    background: #6366f1;
}

.kwm-onboarding__checklist-item.kwm-completed .kwm-onboarding__check-icon {
    border-color: #10b981;
    background: #10b981;
}

.kwm-onboarding__check-icon svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    opacity: 0;
}

.kwm-onboarding__checklist-item.kwm-active .kwm-onboarding__check-icon svg,
.kwm-onboarding__checklist-item.kwm-completed .kwm-onboarding__check-icon svg {
    opacity: 1;
}

/* Navigation */
.kwm-onboarding__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    gap: 12px;
}

.kwm-onboarding__nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #6b7280;
}

.kwm-onboarding__nav-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.kwm-onboarding__nav-btn svg {
    width: 18px;
    height: 18px;
}

.kwm-onboarding__nav-btn--primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.kwm-onboarding__nav-btn--primary:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    transform: translateY(-1px);
}

.kwm-onboarding__skip {
    margin-left: auto;
    margin-right: 8px;
}

/* Completion Screen */
.kwm-onboarding__completion {
    text-align: center;
    padding: 20px 0;
}

.kwm-onboarding__completion-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: kwm-scaleIn 0.4s ease;
}

.kwm-onboarding__completion-icon svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
}

.kwm-onboarding__completion-content {
    font-size: 18px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 24px;
}

.kwm-onboarding__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 12px;
}

.kwm-onboarding__cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: #fff;
}

.kwm-onboarding__close-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.kwm-onboarding__close-btn:hover {
    color: #1f2937;
}

/* Animations */
@keyframes kwm-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes kwm-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Spinner */
.kwm-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: kwm-spin 0.8s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 480px) {
    .kwm-onboarding {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .kwm-onboarding__step-title {
        font-size: 20px;
    }

    .kwm-onboarding__nav {
        flex-wrap: wrap;
    }

    .kwm-onboarding__nav-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .kwm-onboarding__checklist {
        display: none; /* Hide checklist on mobile to save space */
    }
}
