/* Fiyat Farkı ve Ek Ödeme Slider - Frontend Stilleri (Tüm Temalar ve Mobil Uyumlu) */

/* 1. Ana Konteyner ve Container Query Tanımı */
.ffs-calculator-container {
    container-type: inline-size;
    container-name: ffscontainer;
    width: 100% !important;
    max-width: 760px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
    box-sizing: border-box !important;
    overflow-x: hidden;
}

.ffs-calculator-container *,
.ffs-calculator-container *::before,
.ffs-calculator-container *::after {
    box-sizing: border-box !important;
}

/* 2. Kart Yapısı */
.ffs-calc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    padding: 26px 24px;
    width: 100% !important;
    min-width: 0;
}

/* 3. Başlık ve Açıklama */
.ffs-calc-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.ffs-calc-title {
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.ffs-calc-title .ffs-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #2563eb;
    flex-shrink: 0;
}

.ffs-calc-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* 4. Form Grupları ve Etiketler */
.ffs-form-group {
    margin-bottom: 18px;
    width: 100%;
}

.ffs-label {
    display: block;
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px;
    line-height: 1.4;
}

.ffs-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.ffs-label .optional {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 400;
    margin-left: 4px;
}

.ffs-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.ffs-label-inline {
    font-size: 13px;
    color: #334155;
}

.ffs-label-sub {
    font-size: 11px;
    color: #94a3b8;
}

/* Kilitli Sipariş Rozeti */
.ffs-locked-order-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.ffs-locked-order-badge .dashicons {
    color: #2563eb;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* İkili Alan Satırı (Sipariş No & Not) */
.ffs-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.ffs-input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.ffs-input-icon-wrap .dashicons {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.ffs-input-icon-wrap .ffs-input {
    padding-left: 38px !important;
}

.ffs-input {
    width: 100% !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.ffs-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* 5. Tutar Girişi ve Slider Satırı */
.ffs-amount-section {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.ffs-amount-slider-row {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
}

.ffs-amount-input-box {
    flex-shrink: 0;
    width: 140px;
}

.ffs-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.ffs-amount-input {
    width: 100% !important;
    height: 46px !important;
    padding-right: 36px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: right !important;
    color: #2563eb !important;
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

.ffs-amount-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

.ffs-input-unit {
    position: absolute;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
}

.ffs-input-unit.right {
    right: 12px;
}

.ffs-input-unit.left {
    left: 12px;
}

/* 6. Slider ve Kayan Baloncuk */
.ffs-slider-container {
    position: relative;
    flex-grow: 1;
    min-width: 0;
    padding-top: 18px;
}

.ffs-bubble {
    position: absolute;
    top: -6px;
    transform: translateX(-50%);
    background: #1e293b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.ffs-bubble::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0 4px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.ffs-slider-container:hover .ffs-bubble,
.ffs-slider-container.active-sliding .ffs-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.ffs-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100% !important;
    min-width: 0;
    height: 7px;
    border-radius: 5px;
    background: #cbd5e1;
    outline: none;
    margin: 4px 0;
    padding: 0;
    cursor: pointer;
    display: block;
}

.ffs-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.1s, background-color 0.1s;
}

.ffs-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #1d4ed8;
}

.ffs-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.ffs-slider-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 5px;
    padding: 0 2px;
    user-select: none;
    line-height: 1;
}

/* 7. Hızlı Ekleme Çipleri */
.ffs-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ffs-chips-row .chips-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.ffs-chips-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ffs-chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ffs-chip-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.ffs-chip-btn:active {
    transform: translateY(0);
}

.ffs-chip-btn.ffs-chip-reset {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}

.ffs-chip-btn.ffs-chip-reset:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* 8. Şartlar Onay Kutusu */
.ffs-terms-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    transition: all 0.2s ease;
    width: 100%;
}

.ffs-terms-box.terms-error {
    border-color: #ef4444;
    background: #fef2f2;
    animation: ffsShake 0.4s ease;
}

@keyframes ffsShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

.ffs-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #334155;
    line-height: 1.4;
}

.ffs-terms-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

.ffs-terms-label .terms-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 4px;
}

/* 9. Fiyat ve Sonuç Kartı */
.ffs-result-area {
    width: 100%;
}

.ffs-price-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    animation: ffsFadeIn 0.3s ease;
    width: 100%;
}

@keyframes ffsFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.ffs-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.ffs-price-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
}

.ffs-price-amount {
    font-size: 32px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin: 4px 0;
}

.ffs-price-subtext {
    display: block;
    font-size: 11px;
    color: #10b981;
    font-weight: 500;
}

.ffs-security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    flex-shrink: 0;
}

.ffs-security-badge .dashicons {
    color: #2563eb;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* 10. Ödeme Butonu */
.ffs-btn-submit {
    width: 100% !important;
    height: 50px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    transition: all 0.2s ease !important;
}

.ffs-btn-submit:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-1px);
}

.ffs-btn-submit:active {
    transform: translateY(0);
}

.ffs-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed !important;
}

.spin {
    animation: ffsSpin 1s infinite linear;
    display: inline-block;
}

@keyframes ffsSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 11. Hata Bildirim Kartı */
.ffs-error-card {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: ffsFadeIn 0.2s ease;
}

.ffs-error-card .dashicons {
    color: #ef4444;
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 12. Responsive ve Container Query Uyumları */
@container ffscontainer (max-width: 540px) {
    .ffs-calc-card {
        padding: 18px 16px;
    }

    .ffs-fields-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ffs-amount-slider-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ffs-amount-input-box {
        width: 100%;
    }

    .ffs-price-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ffs-price-amount {
        font-size: 28px;
    }
}
