/**
 * Motorro Suwak - Style frontendu
 * @version 4.0.2
 */

/* ========== CENTROWANIE DLA DIVI I INNYCH BUILDERÓW ========== */
.motorro-slider-center-wrapper,
div.motorro-slider-center-wrapper,
.et_pb_code_inner .motorro-slider-center-wrapper,
.et_pb_code .motorro-slider-center-wrapper,
.et_pb_text_inner .motorro-slider-center-wrapper,
.et_pb_module .motorro-slider-center-wrapper,
[class*="et_pb"] .motorro-slider-center-wrapper,
body .motorro-slider-center-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

/* ========== RESET & BASE ========== */
.motorro-slider-wrapper,
div.motorro-slider-wrapper,
.et_pb_code_inner .motorro-slider-wrapper,
body .motorro-slider-wrapper {
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #1a1a2e !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 550px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    float: none !important;
    position: relative !important;
    text-align: left !important;
    flex-shrink: 0 !important;
}

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

/* ================================================================
   LAYOUT: NORMAL (domyślny)
   ================================================================ */
.motorro-layout-normal {
    max-width: 550px !important;
}

.motorro-layout-normal .motorro-slider-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.motorro-layout-normal .motorro-slider-section {
    margin-bottom: 24px;
}

.motorro-layout-normal .motorro-slider-section:last-of-type {
    margin-bottom: 20px;
}

.motorro-layout-normal .motorro-slider-section-header {
    text-align: center;
    margin-bottom: 8px;
}

.motorro-layout-normal .motorro-slider-section-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.motorro-layout-normal .motorro-slider-track-wrapper {
    position: relative;
    padding-top: 50px;
    margin-bottom: 4px;
}

.motorro-layout-normal .motorro-slider-value-floating {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 10;
    transition: left 0.1s ease-out;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.motorro-layout-normal .motorro-slider-value-floating::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #3b82f6;
}

.motorro-layout-normal .motorro-stations-value {
    font-size: 24px;
    font-weight: 800;
    padding: 6px 20px;
}

.motorro-layout-normal .motorro-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--motorro-progress, 15%), #e2e8f0 var(--motorro-progress, 15%), #e2e8f0 100%);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin: 0;
    border: none;
}

.motorro-layout-normal .motorro-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    background: #fff;
    border: 4px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59,130,246,0.35);
    transition: transform 0.15s ease;
}

.motorro-layout-normal .motorro-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.motorro-layout-normal .motorro-slider-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 4px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.motorro-layout-normal .motorro-slider-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.motorro-layout-normal .motorro-slider-min,
.motorro-layout-normal .motorro-slider-max {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
}

.motorro-layout-normal .motorro-stations-info {
    text-align: center;
    margin-top: 0;
}

.motorro-layout-normal .motorro-stations-info-text {
    font-size: 14px;
    color: #6b7280;
}

.motorro-layout-normal .motorro-stations-info-text strong {
    color: #3b82f6;
    font-weight: 700;
}

.motorro-layout-normal .motorro-slider-savings {
    border-radius: 12px;
    padding: 18px 24px;
    text-align: center;
}

.motorro-layout-normal .motorro-slider-savings-text {
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 6px 0;
}

.motorro-layout-normal .motorro-slider-savings-amount-wrapper {
    margin: 0;
}

.motorro-layout-normal .motorro-slider-savings-amount {
    display: inline-block;
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    padding: 6px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: transform 0.15s ease;
}

.motorro-layout-normal .motorro-slider-savings-period {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0 0 0;
    font-weight: 500;
}

/* ================================================================
   LAYOUT: COMPACT (mniejszy, węższy)
   ================================================================ */
.motorro-layout-compact {
    max-width: 420px !important;
}

.motorro-layout-compact .motorro-slider-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
}

.motorro-layout-compact .motorro-slider-section {
    margin-bottom: 16px;
}

.motorro-layout-compact .motorro-slider-section:last-of-type {
    margin-bottom: 14px;
}

.motorro-layout-compact .motorro-slider-section-header {
    text-align: center;
    margin-bottom: 4px;
}

.motorro-layout-compact .motorro-slider-section-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.motorro-layout-compact .motorro-slider-track-wrapper {
    position: relative;
    padding-top: 38px;
    margin-bottom: 2px;
}

.motorro-layout-compact .motorro-slider-value-floating {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    padding: 5px 12px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 10;
    transition: left 0.1s ease-out;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.35);
}

.motorro-layout-compact .motorro-slider-value-floating::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #3b82f6;
}

.motorro-layout-compact .motorro-stations-value {
    font-size: 18px;
    font-weight: 800;
    padding: 4px 14px;
}

.motorro-layout-compact .motorro-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--motorro-progress, 15%), #e2e8f0 var(--motorro-progress, 15%), #e2e8f0 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    margin: 0;
    border: none;
}

.motorro-layout-compact .motorro-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
    transition: transform 0.15s ease;
}

.motorro-layout-compact .motorro-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.motorro-layout-compact .motorro-slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.motorro-layout-compact .motorro-slider-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.motorro-layout-compact .motorro-slider-min,
.motorro-layout-compact .motorro-slider-max {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.motorro-layout-compact .motorro-stations-info {
    text-align: center;
    margin-top: 6px;
}

.motorro-layout-compact .motorro-stations-info-text {
    font-size: 12px;
    color: #6b7280;
}

.motorro-layout-compact .motorro-stations-info-text strong {
    color: #3b82f6;
    font-weight: 700;
}

.motorro-layout-compact .motorro-slider-savings {
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
}

.motorro-layout-compact .motorro-slider-savings-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 4px 0;
}

.motorro-layout-compact .motorro-slider-savings-amount-wrapper {
    margin: 0;
}

.motorro-layout-compact .motorro-slider-savings-amount {
    display: inline-block;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: transform 0.15s ease;
}

.motorro-layout-compact .motorro-slider-savings-period {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 6px 0 0 0;
    font-weight: 500;
}

/* ================================================================
   LAYOUT: SPACIOUS (większy, szerszy)
   ================================================================ */
.motorro-layout-spacious {
    max-width: 700px !important;
}

.motorro-layout-spacious .motorro-slider-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 20px;
    padding: 40px 44px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.motorro-layout-spacious .motorro-slider-section {
    margin-bottom: 36px;
}

.motorro-layout-spacious .motorro-slider-section:last-of-type {
    margin-bottom: 28px;
}

.motorro-layout-spacious .motorro-slider-section-header {
    text-align: center;
    margin-bottom: 12px;
}

.motorro-layout-spacious .motorro-slider-section-title {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.motorro-layout-spacious .motorro-slider-track-wrapper {
    position: relative;
    padding-top: 65px;
    margin-bottom: 6px;
}

.motorro-layout-spacious .motorro-slider-value-floating {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 10;
    transition: left 0.1s ease-out;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.45);
}

.motorro-layout-spacious .motorro-slider-value-floating::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #3b82f6;
}

.motorro-layout-spacious .motorro-stations-value {
    font-size: 32px;
    font-weight: 800;
    padding: 10px 28px;
}

.motorro-layout-spacious .motorro-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--motorro-progress, 15%), #e2e8f0 var(--motorro-progress, 15%), #e2e8f0 100%);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    margin: 0;
    border: none;
}

.motorro-layout-spacious .motorro-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 5px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(59,130,246,0.4);
    transition: transform 0.15s ease;
}

.motorro-layout-spacious .motorro-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.motorro-layout-spacious .motorro-slider-input::-moz-range-thumb {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 5px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.motorro-layout-spacious .motorro-slider-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.motorro-layout-spacious .motorro-slider-min,
.motorro-layout-spacious .motorro-slider-max {
    font-size: 15px;
    font-weight: 500;
    color: #94a3b8;
}

.motorro-layout-spacious .motorro-stations-info {
    text-align: center;
    margin-top: 14px;
}

.motorro-layout-spacious .motorro-stations-info-text {
    font-size: 16px;
    color: #6b7280;
}

.motorro-layout-spacious .motorro-stations-info-text strong {
    color: #3b82f6;
    font-weight: 700;
}

.motorro-layout-spacious .motorro-slider-savings {
    border-radius: 14px;
    padding: 24px 32px;
    text-align: center;
}

.motorro-layout-spacious .motorro-slider-savings-text {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 8px 0;
}

.motorro-layout-spacious .motorro-slider-savings-amount-wrapper {
    margin: 0;
}

.motorro-layout-spacious .motorro-slider-savings-amount {
    display: inline-block;
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    padding: 8px 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: transform 0.15s ease;
}

.motorro-layout-spacious .motorro-slider-savings-period {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0 0 0;
    font-weight: 500;
}

/* ========== ANIMACJA ========== */
.motorro-slider-savings-amount.motorro-updating {
    transform: scale(1.05);
}

/* ========== RESPONSYWNOŚĆ ========== */
@media (max-width: 500px) {
    .motorro-slider-wrapper {
        max-width: 100% !important;
    }
    
    /* Na mobile wszystkie layouty wyglądają jak compact */
    .motorro-slider-container {
        padding: 18px 16px !important;
        border-radius: 12px !important;
    }

    .motorro-slider-section {
        margin-bottom: 16px !important;
    }

    .motorro-slider-section-title {
        font-size: 16px !important;
    }

    .motorro-slider-track-wrapper {
        padding-top: 38px !important;
    }

    .motorro-slider-value-floating {
        font-size: 14px !important;
        padding: 5px 12px !important;
    }

    .motorro-slider-value-floating::after {
        bottom: -6px !important;
        border-width: 6px !important;
    }

    .motorro-stations-value {
        font-size: 18px !important;
        padding: 4px 14px !important;
    }

    .motorro-slider-input {
        height: 6px !important;
    }

    .motorro-slider-input::-webkit-slider-thumb {
        width: 22px !important;
        height: 22px !important;
        border-width: 3px !important;
    }

    .motorro-slider-min,
    .motorro-slider-max {
        font-size: 11px !important;
    }

    .motorro-stations-price-value {
        font-size: 16px !important;
    }

    .motorro-slider-savings {
        padding: 12px 16px !important;
        border-radius: 10px !important;
    }

    .motorro-slider-savings-text {
        font-size: 14px !important;
    }

    .motorro-slider-savings-amount {
        font-size: 20px !important;
        padding: 3px 12px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .motorro-slider-wrapper * {
        transition: none !important;
    }
}
