/**
 * Tengo Fundraising - Frontend Styles
 * Wersja: Basic - Enhanced v5
 */

/* Kontener formularza */
.tf-donation-form {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Sekcje formularza */
.tf-form-section {
    background: #f9fafb;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.tf-form-section h3,
.tf-form-section .tf-section-title {
    margin: 0 0 15px 0;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    padding: 0;
    border: none;
    background: none;
    text-transform: none;
    letter-spacing: normal;
}

/* =====================================================
   PRZYCISKI KWOT - SPÃ“JNY STYL DLA WSZYSTKICH
   ===================================================== */

.tf-preset-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

/* 6 przycisków = 2 rzędy po 3 (ostatni = własna kwota) */
.tf-preset-amounts.tf-cols-3,
.tf-tiles-grid.tf-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
/* Wąski formularz desktopowy (np. shortcode na zwykłej stronie) — degraduj do 2 kolumn */
@media (max-width: 700px) {
    .tf-preset-amounts.tf-cols-3,
    .tf-tiles-grid.tf-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tf-amount-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: none;
}

.tf-amount-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-1px);
}

.tf-amount-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Stan zaznaczony - IDENTYCZNY dla wszystkich przyciskÃ³w */
.tf-amount-btn.selected {
    background: #2563eb;
    color: white;
    border-color: #1d4ed8; /* Osobny kolor obramowania! */
}

/* =====================================================
   POLE WÅASNEJ KWOTY - WYGLÄ„DA JAK INPUT, NIE PRZYCISK
   ===================================================== */

.tf-custom-amount {
    margin-top: 15px;
}

.tf-custom-amount-field {
    position: relative;
    width: 100%;
}

/* Input wÅ‚asnej kwoty - te same style co inne pola formularza */
.tf-custom-amount-input {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 12px;
    font-size: 16px;
    font-weight: 400;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.tf-custom-amount-input::placeholder {
    color: #9ca3af;
    text-align: center;
    opacity: 1;
}

.tf-custom-amount-input:hover {
    border-color: #374151;
}

.tf-custom-amount-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Ukrycie strzaÅ‚ek dla number input */
.tf-custom-amount-input::-webkit-outer-spin-button,
.tf-custom-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tf-custom-amount-input {
    -moz-appearance: textfield;
}

/* Znak "zÅ‚" - ukryty domyÅ›lnie */
.tf-currency-suffix {
    position: absolute;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Gdy pole jest w trybie wpisywania (ma klasÄ™ .tf-typing) */
.tf-custom-amount-field.tf-typing .tf-currency-suffix {
    opacity: 1;
    right: calc(50% - 30px);
    transform: translate(0, -50%);
}

/* Gdy wpisana kwota - tekst i zÅ‚ wyÅ›rodkowane */
.tf-custom-amount-field.tf-has-value .tf-custom-amount-input {
    padding-right: 40px;
    text-align: center;
}

/* Stan bÅ‚Ä™du */
.tf-custom-amount-input.tf-error {
    border-color: #ef4444;
}

/* =====================================================
   TEKST INFORMACYJNY POD KWOTAMI
   ===================================================== */

.tf-amount-info {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 8px 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
    text-align: center;
}

.tf-amount-info.tf-visible {
    display: block;
}

.tf-amount-info-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    max-width: 90%;
    box-sizing: border-box;
}

.tf-amount-info-content.tf-with-icon {
    display: inline-flex;
}

.tf-amount-info-text {
    line-height: 1.5;
    text-wrap: balance;
    text-align: center;
}

.tf-amount-info-content.tf-with-icon .tf-amount-info-text {
    text-align: left;
    text-wrap: wrap;
    max-width: 350px;
}

.tf-amount-info-text strong {
    font-weight: 700;
}

.tf-amount-info-icon {
    display: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

/* =====================================================
   POLA FORMULARZA - DANE OSOBOWE
   ===================================================== */

.tf-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.tf-form-group {
    margin-bottom: 15px;
}

.tf-form-group.tf-half {
    flex: 1;
}

.tf-form-group.tf-full {
    flex: 1;
}

.tf-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Wszystkie pola tekstowe - spÃ³jny styl */
.tf-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 400;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tf-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.tf-input:hover {
    border-color: #374151;
}

.tf-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Nadpisanie autofill Chrome */
.tf-input:-webkit-autofill,
.tf-input:-webkit-autofill:hover,
.tf-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset;
    -webkit-text-fill-color: #1f2937;
    transition: background-color 5000s ease-in-out 0s;
}

/* Stan bÅ‚Ä™du */
.tf-input.tf-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.03);
}

.tf-input.tf-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* =====================================================
   CHECKBOXY - CUSTOM STYLING
   ===================================================== */

.tf-consent-item {
    margin-bottom: 16px;
}

.tf-consent-item:last-child {
    margin-bottom: 0;
}

.tf-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

/* Custom checkbox */
.tf-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 10px 0 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.tf-checkbox:hover {
    border-color: #2563eb;
}

.tf-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Checkbox zaznaczony - kolor jak zaznaczony przycisk kwoty */
.tf-checkbox:checked {
    background: #2563eb;
    border-color: #2563eb;
}

.tf-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tf-checkbox.tf-error {
    border-color: #ef4444;
}

.tf-consent-text {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    flex: 1;
}

/* =====================================================
   BÅÄ˜DY WALIDACJI
   ===================================================== */

.tf-field-error {
    display: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.4;
}

.tf-consent-item .tf-field-error {
    margin-left: 28px;
    font-size: 12px;
}

.tf-required {
    color: #ef4444;
    font-weight: normal;
}

/* =====================================================
   PRZYCISK SUBMIT
   ===================================================== */

.tf-submit-section {
    text-align: center;
}

.tf-submit-btn {
    width: 100%;
    height: 48px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.tf-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tf-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.tf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loader w przycisku */
.tf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: tf-spin 0.8s linear infinite;
}

@keyframes tf-spin {
    to { transform: rotate(360deg); }
}

/* Informacja o bezpieczeÅ„stwie */
.tf-secure-info {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

/* =====================================================
   KOMUNIKATY
   ===================================================== */

.tf-messages {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.tf-messages.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.tf-messages.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* =====================================================
   TRYB ROZWIJANY
   ===================================================== */

.tf-mode-collapsed .tf-expandable-sections {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-out;
}

.tf-mode-collapsed.tf-expanded .tf-expandable-sections {
    max-height: 3000px;
    opacity: 1;
}

/* =====================================================
   TRYB KOMPAKTOWY
   ===================================================== */

.tf-donation-form.tf-compact .tf-form-section {
    margin-bottom: 0;
}

.tf-donation-form.tf-compact.tf-expanded .tf-amounts-section,
.tf-donation-form.tf-compact.tf-mode-expanded .tf-amounts-section {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.tf-donation-form.tf-compact.tf-expanded .tf-donor-section,
.tf-donation-form.tf-compact.tf-mode-expanded .tf-donor-section {
    border-radius: 0;
    border-top: none;
    border-bottom: none;
}

.tf-donation-form.tf-compact.tf-expanded .tf-consents-section,
.tf-donation-form.tf-compact.tf-mode-expanded .tf-consents-section {
    border-radius: 0;
    border-top: none;
    border-bottom: none;
}

.tf-donation-form.tf-compact.tf-expanded .tf-submit-section,
.tf-donation-form.tf-compact.tf-mode-expanded .tf-submit-section {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

/* =====================================================
   RESPONSYWNOÅšÄ† - MOBILE
   ===================================================== */

@media (max-width: 1920px) and (min-width: 1367px) {
    .tf-donation-form {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .tf-donation-form {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        box-shadow: none;
        filter: none;
    }

    .tf-donation-form .tf-form-section {
        border-radius: 0;
        padding: 16px;
        margin-bottom: 0;
        border: none;
        box-shadow: none;
    }
    
    .tf-expandable-sections {
        margin: 0;
        padding: 0;
    }
    
    .tf-amounts-section {
        border-top: none;
    }
    
    .tf-submit-section {
        border-bottom: none;
    }
    
    .tf-form-section h3,
    .tf-section-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .tf-preset-amounts {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .tf-amount-btn {
        height: 44px;
        font-size: 15px;
    }
    
    .tf-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tf-form-group.tf-half {
        flex: none;
        width: 100%;
    }
    
    .tf-input {
        font-size: 16px; /* Zapobiega zoom na iOS */
        height: 44px;
    }
    
    .tf-custom-amount-input {
        font-size: 16px;
        height: 44px;
    }
    
    .tf-checkbox {
        min-width: 20px;
        width: 20px;
        height: 20px;
    }
    
    .tf-consent-text {
        font-size: 13px;
    }
    
    .tf-submit-btn {
        height: 50px;
        font-size: 16px;
    }
}

@media (max-width: 375px) {
    .tf-form-section {
        padding: 14px 12px;
    }
    
    .tf-preset-amounts {
        gap: 6px;
    }
    
    .tf-amount-btn {
        font-size: 14px;
    }
}

/* =====================================================
   MODAL PRZEKIEROWANIA
   ===================================================== */

.tf-redirect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.tf-redirect-modal.tf-modal-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-redirect-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
}

.tf-redirect-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    max-width: 90%;
    width: 500px;
    z-index: 1;
}

.tf-redirect-logo {
    max-width: 200px;
    max-height: 80px;
    margin-bottom: 30px;
}

.tf-redirect-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.tf-redirect-text {
    color: #ffffff;
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 30px 0;
}

.tf-redirect-spinner {
    display: flex;
    justify-content: center;
}

.tf-spinner-svg {
    width: 50px;
    height: 50px;
    animation: tf-spinner-rotate 2s linear infinite;
}

.tf-spinner-circle {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: tf-spinner-dash 1.5s ease-in-out infinite;
}

@keyframes tf-spinner-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes tf-spinner-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .tf-redirect-modal-content {
        padding: 30px 20px;
    }
    
    .tf-redirect-title {
        font-size: 20px;
    }
    
    .tf-redirect-text {
        font-size: 14px;
    }
    
    .tf-redirect-logo {
        max-width: 150px;
        max-height: 60px;
    }
}

/* ========================================
   TRYB KAFELKOWY - FALLBACK STYLES
   ======================================== */

.tf-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.tf-amount-tile {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 5px 8px 5px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-sizing: border-box;
}

.tf-amount-tile:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.tf-amount-tile.selected {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.tf-amount-tile.selected .tf-tile-amount,
.tf-amount-tile.selected .tf-tile-desc,
.tf-amount-tile.selected .tf-tile-line1,
.tf-amount-tile.selected .tf-tile-line2 {
    color: #ffffff;
}

.tf-tile-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-tile-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: invert(1);
}

.tf-amount-tile.selected .tf-tile-icon img {
    filter: invert(0);
}

/* Odwrocenie kolorow ikon na biale */
.tf-tiles-invert-icons .tf-tile-icon img {
    filter: invert(1);
}

.tf-tiles-invert-icons .tf-amount-tile.selected .tf-tile-icon img {
    filter: invert(0);
}

.tf-tile-icon-placeholder {
    background: #f3f4f6;
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

.tf-amount-tile.selected .tf-tile-icon-placeholder {
    background: rgba(255,255,255,0.2);
}

.tf-tile-amount {
    font-size: 30px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
    line-height: 1.1;
}

.tf-tile-desc {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
    color: #1f2937;
    line-height: 1.2;
    max-width: 100%;
}

.tf-tile-line1,
.tf-tile-line2 {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 600;
    color: #1f2937;
}

/* Kafelek Wlasna kwota */
.tf-tile-custom {
    position: relative;
}

.tf-tile-custom .tf-tile-amount {
    font-size: 22px;
    margin-bottom: 4px;
}

.tf-tile-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
}

.tf-tile-custom-input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    background: #fff;
    transition: all 0.2s ease;
    line-height: 1;
}

.tf-tile-custom-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.tf-tile-custom-input::placeholder {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    line-height: 1;
}

.tf-tile-custom.selected .tf-tile-custom-input {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.95);
    color: #1f2937;
}

.tf-tile-custom.selected .tf-tile-custom-input::placeholder {
    color: #9ca3af;
}

.tf-tile-currency {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.tf-tile-custom.selected .tf-tile-currency {
    color: #ffffff;
}

/* Komunikat o minimalnej kwocie */
.tf-tile-min-error {
    margin-top: 6px;
    padding: 0;
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

/* Responsywnosc mobile - kafelki 2x2 */
@media (max-width: 768px) {
    .tf-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .tf-tile-icon {
        width: 48px;
        height: 48px;
    }
    
    .tf-tile-amount {
        font-size: 24px;
    }
    
    .tf-tile-desc {
        font-size: 13px;
    }
    
    .tf-tile-custom .tf-tile-amount {
        font-size: 16px;
    }
    
    .tf-tile-custom-input {
        width: 60px;
        font-size: 14px;
        padding: 4px 6px;
    }
    
    .tf-tile-currency {
        font-size: 14px;
    }
}

/* =====================================================
   PRZEŁĄCZNIK JEDNORAZOWA / MIESIĘCZNA
   ===================================================== */

.tf-payment-type-toggle,
.tfm-payment-type-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px;
}

.tf-type-btn,
.tfm-type-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #c6c6c6;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tf-type-btn:hover,
.tfm-type-btn:hover {
    color: #374151;
}

.tf-type-btn:focus,
.tfm-type-btn:focus {
    outline: none;
}

.tf-type-btn.active,
.tfm-type-btn.active {
    background: rgba(242, 145, 0, 0.08);
    color: #1f2937;
    font-weight: 600;
    border: 2px solid #f29100;
    box-shadow: none;
}

/* =====================================================
   DONATION SUMMARY
   ===================================================== */

.tf-donation-summary,
.tfm-donation-summary {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    line-height: 1.5;
}

.tf-summary-amount,
.tfm-summary-amount {
    color: #2563eb;
    font-size: 18px;
}

.tf-summary-cycle,
.tfm-summary-cycle {
    color: #6b7280;
    font-weight: 600;
}

/* =====================================================
   PAYMENT METHOD SELECTION (BLIK / Card / Transfer)
   ===================================================== */

.tf-payment-methods,
.tfm-payment-methods {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px;
}

.tf-method-btn,
.tfm-method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid #c6c6c6;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tf-method-btn:hover,
.tfm-method-btn:hover {
    color: #374151;
}

.tf-method-btn:focus,
.tfm-method-btn:focus {
    outline: none;
}

.tf-method-btn.active,
.tfm-method-btn.active {
    background: rgba(242, 145, 0, 0.08);
    color: #1f2937;
    font-weight: 600;
    border: 2px solid #f29100;
    box-shadow: none;
}

.tf-method-btn.disabled,
.tfm-method-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Payment method icons — stała strefa, wyrównanie w pionie */
.tf-method-icon,
.tfm-method-icon {
    display: block;
    flex-shrink: 0;
    height: 40px;
    width: auto;
    object-fit: contain;
}

.tf-method-icon-sm,
.tfm-method-icon-sm {
    height: 30px !important;
    margin-bottom: 4px !important;
}

.tf-method-label,
.tfm-method-label {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

/* Payment method panels */
.tf-method-panel,
.tfm-method-panel {
    margin-top: 12px;
}

/* BLIK code input */
.tf-blik-label,
.tfm-blik-label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.tf-blik-code-input,
.tfm-blik-code-input {
    width: 100%;
    max-width: 200px;
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 8px;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.tf-blik-code-input:focus,
.tfm-blik-code-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Card panel title - same as section titles */
.tf-card-title,
.tfm-card-title {
    margin: 4px 0 12px;
}

/* PayU Secure Form */
.tf-secure-form-container,
.tfm-secure-form-container {
    margin: 0;
}

.tf-secure-form-row,
.tfm-secure-form-row {
    margin-bottom: 12px;
}

.tf-secure-form-row-half,
.tfm-secure-form-row-half {
    display: flex;
    gap: 12px;
}

.tf-secure-form-col,
.tfm-secure-form-col {
    flex: 1;
}

.tf-secure-form-label,
.tfm-secure-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.tf-secure-form-field,
.tfm-secure-form-field {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    padding: 0 16px;
    transition: border-color 0.2s;
}
.tf-secure-form-field iframe,
.tfm-secure-form-field iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent;
}

.tf-secure-form-field:focus-within,
.tfm-secure-form-field:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tf-secure-form-error,
.tfm-secure-form-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Transfer panel — bank grid */
.tf-bank-grid,
.tfm-bank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tf-bank-btn,
.tfm-bank-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 70px;
}

.tf-bank-btn:hover,
.tfm-bank-btn:hover {
    border-color: #9ca3af;
}

.tf-bank-btn.selected,
.tfm-bank-btn.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #eff6ff;
}

.tf-bank-icon,
.tfm-bank-icon {
    width: 48px;
    height: 32px;
    object-fit: contain;
}

.tf-bank-name,
.tfm-bank-name {
    font-size: 11px;
    color: #374151;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

.tf-bank-loading,
.tfm-bank-loading {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
    margin: 0;
    padding: 16px 0;
    text-align: center;
}

.tf-bank-error,
.tfm-bank-error {
    color: #ef4444;
    font-size: 13px;
    margin: 0;
    padding: 12px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
    text-align: center;
}

@media (max-width: 480px) {
    .tf-bank-grid,
    .tfm-bank-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   CUSTOM AMOUNT INLINE INPUT
   ===================================================== */

/* Custom amount inline input - styled as selected button */
.tf-custom-btn-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
}

.tf-custom-btn-input .tf-custom-amount-input {
    width: 70px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
}

.tf-custom-btn-input .tf-custom-amount-input::placeholder {
    color: inherit;
    opacity: 0.7;
    text-align: center;
}

.tf-custom-btn-input .tf-custom-amount-input::-webkit-outer-spin-button,
.tf-custom-btn-input .tf-custom-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tf-custom-btn-input .tf-currency-suffix {
    position: static;
    transform: none;
    opacity: 1;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
    display: none;
}

/* Show zł when input has value */
.tf-custom-amount-btn.tf-has-value .tf-custom-btn-input .tf-currency-suffix {
    display: inline;
}

/* =====================================================
   AMOUNT BUTTON WRAPPER (for popular badge)
   ===================================================== */

.tf-amount-btn-wrapper {
    position: relative;
    display: flex;
    min-width: 0;
}

.tf-amount-btn-wrapper .tf-amount-btn {
    width: 100%;
    flex: 1;
}

.tf-btn-popular {
    position: relative;
    align-self: center;
}

.tf-btn-popular .tf-popular-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* =====================================================
   BLIK INPUT CENTERING
   ===================================================== */

.tf-blik-input-wrapper,
.tfm-blik-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =====================================================
   BLIK INLINE - CONFIRMATION / POLLING UI
   ===================================================== */

.tf-blik-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.tf-blik-confirm-icon {
    margin-bottom: 20px;
}

.tf-blik-confirm-icon svg {
    display: inline-block;
}

/* Animacja pulsowania dla ikony oczekiwania */
.tf-blik-confirm-icon:not(.tf-blik-success-icon):not(.tf-blik-error-icon) svg circle {
    animation: tf-blik-pulse 2s ease-in-out infinite;
}

@keyframes tf-blik-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.tf-blik-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.tf-blik-confirm-text {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 20px 0;
    line-height: 1.5;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.tf-blik-confirm-spinner {
    margin-bottom: 16px;
}

.tf-blik-confirm-spinner .tf-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
}

.tf-blik-confirm-timer {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.tf-blik-continue-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 12px;
}

.tf-blik-continue-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
}

.tf-blik-retry-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tf-blik-retry-btn:hover {
    background: #1d4ed8;
}

.tf-blik-retry-btn.tf-blik-retry-secondary {
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
}

.tf-blik-retry-btn.tf-blik-retry-secondary:hover {
    color: #374151;
    background: #f3f4f6;
}

.tf-blik-input-wrapper .tf-blik-label,
.tfm-blik-input-wrapper .tfm-blik-label {
    text-align: center;
}

