/*
 * Kalkulator Widget CSS
 * Plik: /wp-content/themes/konrad-niewczas-theme/calculator.css
 * Ładowany na stronach z kalkulatorem
 */

:root {
    --navy: #001a57;
    --navy-dark: #001240;
    --navy-light: #002878;
    --orange: #EE5F18;
    --orange-hover: #d65514;
    --orange-glow: rgba(238, 95, 24, 0.15);
    --yellow: #f5a623;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f0f1f3;
    --gray-200: #e0e0e0;
    --gray-400: #999;
    --gray-600: #555;
    --gray-800: #333;
    --font-h: 'Poppins', sans-serif;
    --font-b: 'Rubik', sans-serif;
}

/* ===== WIDGET CONTAINER ===== */
.calc-widget {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.calc-header {
    text-align: center;
    padding: 40px 30px 35px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}
.calc-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
    border-radius: 50%;
}
.calc-header-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--orange);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 25px rgba(238, 95, 24, 0.3);
}
.calc-header-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}
.calc-header h2 {
    font-family: var(--font-h);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    position: relative;
}
.calc-header p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}

/* ===== BODY ===== */
.calc-body {
    background: var(--white);
    padding: 0;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 40px rgba(0, 26, 87, 0.08);
    overflow: hidden;
}

/* ===== STEPS / PROGRESS ===== */
.calc-progress {
    display: flex;
    padding: 0;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}
.calc-progress-step {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    font-family: var(--font-h);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    position: relative;
    transition: all 0.3s ease;
    cursor: default;
}
.calc-progress-step.active {
    color: var(--navy);
    background: var(--white);
}
.calc-progress-step.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--orange);
}
.calc-progress-step.done {
    color: var(--orange);
}
.calc-progress-step .step-num {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.7rem;
    margin-right: 5px;
    transition: all 0.3s ease;
}
.calc-progress-step.active .step-num {
    background: var(--navy);
    color: var(--white);
}
.calc-progress-step.done .step-num {
    background: var(--orange);
    color: var(--white);
}

/* ===== STEP PANELS ===== */
.calc-step {
    display: none;
    padding: 35px 30px;
    animation: fadeSlideIn 0.4s ease;
}
.calc-step.active {
    display: block;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.step-desc {
    font-size: 0.88rem;
    color: var(--gray-400);
    margin-bottom: 28px;
}

/* ===== FORM FIELDS ===== */
.field-group {
    margin-bottom: 24px;
}
.field-label {
    display: block;
    font-family: var(--font-h);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}
.field-label .hint {
    font-weight: 400;
    color: var(--gray-400);
    font-size: 0.78rem;
}

/* Slider field */
.slider-field {
    position: relative;
}
.slider-value-display {
    text-align: right;
    font-family: var(--font-h);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    min-height: 36px;
}
.slider-value-display .unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-400);
    margin-left: 2px;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-100);
    outline: none;
    cursor: pointer;
    position: relative;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(238, 95, 24, 0.3);
    border: 3px solid var(--white);
    transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(238, 95, 24, 0.3);
    border: 3px solid var(--white);
}
.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Select styled */
.styled-select {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-b);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    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='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: all 0.2s ease;
}
.styled-select:focus {
    outline: none;
    border-color: var(--orange);
    background-color: var(--white);
}

/* Radio cards */
.radio-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.radio-card {
    position: relative;
}
.radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.radio-card label:hover {
    border-color: var(--navy);
}
.radio-card input:checked + label {
    border-color: var(--orange);
    background: rgba(238, 95, 24, 0.05);
    box-shadow: 0 0 0 1px var(--orange);
}
.radio-card-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}
.radio-card-title {
    font-family: var(--font-h);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 2px;
}
.radio-card-desc {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ===== BUTTONS ===== */
.calc-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}
.calc-btn {
    flex: 1;
    padding: 15px 20px;
    font-family: var(--font-h);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.calc-btn-back {
    background: var(--gray-50);
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
    flex: 0.4;
}
.calc-btn-back:hover {
    background: var(--gray-100);
}
.calc-btn-next {
    background: var(--orange);
    color: var(--white);
}
.calc-btn-next:hover {
    background: var(--orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(238, 95, 24, 0.3);
}

/* ===== TEASER RESULTS ===== */
.teaser-results {
    margin-bottom: 30px;
}
.teaser-card {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 16px;
    padding: 30px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}
.teaser-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
    border-radius: 50%;
}
.teaser-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 6px;
    position: relative;
}
.teaser-card-value {
    font-family: var(--font-h);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--orange);
    position: relative;
    line-height: 1.1;
}
.teaser-card-value .currency {
    font-size: 1.2rem;
    font-weight: 600;
}
.teaser-card-sub {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 6px;
    position: relative;
}

.teaser-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.teaser-stat {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    border: 1px solid var(--gray-200);
}
.teaser-stat-value {
    font-family: var(--font-h);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
}
.teaser-stat-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

/* Blurred content */
.teaser-blurred {
    position: relative;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
}
.teaser-blurred-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    padding: 20px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
}
.teaser-blurred-content p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--gray-600);
}
.teaser-blurred-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(2px);
}
.teaser-lock-icon {
    width: 48px;
    height: 48px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.teaser-lock-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--white);
}
.teaser-lock-text {
    font-family: var(--font-h);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}

/* ===== LEAD FORM ===== */
.lead-form-section {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    padding: 28px 24px;
}
.lead-form-section h3 {
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}
.lead-form-section .lead-subtitle {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}
.lead-input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-b);
    font-size: 16px;
    color: var(--gray-800);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}
.lead-input:focus {
    outline: none;
    border-color: var(--orange);
}
.lead-input::placeholder {
    color: var(--gray-400);
}
.lead-submit {
    width: 100%;
    padding: 16px;
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: var(--orange);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.lead-submit:hover {
    background: var(--orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(238, 95, 24, 0.3);
}
.lead-privacy {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-align: center;
    margin-top: 12px;
}
.lead-privacy a {
    color: var(--orange);
    text-decoration: underline;
}
.lead-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.lead-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--gray-600);
}
.lead-benefit svg {
    width: 18px;
    height: 18px;
    fill: var(--orange);
    flex-shrink: 0;
}

/* ===== SUCCESS STATE ===== */
.calc-success {
    display: none;
    text-align: center;
    padding: 50px 30px;
    animation: fadeSlideIn 0.5s ease;
}
.calc-success.active {
    display: block;
}
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(238, 95, 24, 0.25);
}
.success-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--white);
}
.calc-success h3 {
    font-family: var(--font-h);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}
.calc-success p {
    font-size: 0.95rem;
    color: var(--gray-600);
    max-width: 380px;
    margin: 0 auto 25px;
}
.calc-success .calc-btn-next {
    max-width: 280px;
    margin: 0 auto;
    display: block;
}

/* ===== LOADING ANIMATION ===== */
.calc-loading {
    display: none;
    text-align: center;
    padding: 60px 30px;
}
.calc-loading.active {
    display: block;
}
.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-text {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.loading-sub {
    font-size: 0.85rem;
    color: var(--gray-400);
}
.loading-bar {
    width: 200px;
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    margin: 20px auto 0;
    overflow: hidden;
}
.loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== CALCULATOR RESPONSIVE ===== */
@media (max-width: 768px) {
    .calc-widget { padding: 12px; }
    .calc-header { padding: 30px 20px 28px; border-radius: 14px 14px 0 0; }
    .calc-header h2 { font-size: 1.3rem; }
    .calc-header p { font-size: 0.85rem; }
    .calc-step { padding: 25px 20px; }
    .radio-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .radio-card label { padding: 15px 10px; }
    .radio-card-icon { font-size: 1.4rem; }
    .teaser-card { padding: 24px 20px; }
    .teaser-card-value { font-size: 2rem; }
    .teaser-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .lead-form-section { padding: 22px 18px; }
    .calc-progress-step { font-size: 0.65rem; padding: 10px 6px; }
    .slider-value-display { font-size: 1.3rem; }
    .step-title { font-size: 1.05rem; }
    .calc-buttons { gap: 8px; }
}
@media (max-width: 380px) {
    .radio-cards { grid-template-columns: 1fr; }
}
