/**
 * Sola Donation Form Styles - Enhanced Version
 * Multi-step form with refined animations
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
    --primary-blue: #023047;
    --accent-orange: #F49431;
    --accent-orange-light: #ff9d47;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(2, 48, 71, 0.1);
    --input-bg: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 1px 3px rgba(2, 48, 71, 0.08);
    --shadow-md: 0 4px 12px rgba(2, 48, 71, 0.1);
    --shadow-lg: 0 8px 20px rgba(2, 48, 71, 0.12);
    --shadow-xl: 0 12px 28px rgba(2, 48, 71, 0.15);
    --security-green: #22c55e;
    --security-green-bg: rgba(34, 197, 94, 0.08);
}

/* Number Font */
.number-font,
.amount-symbol,
.currency-symbol,
.amount-display {
    font-family: 'Outfit', sans-serif !important;
}

/* Main Wrapper */
.sola-donation-form-wrapper {
    min-height: auto;
    padding: 20px;
    background: transparent;
    transition: direction 0.3s ease;
}

.sola-donation-form-wrapper[dir="rtl"] {
    font-family: 'Noto Sans Hebrew', sans-serif;
    direction: rtl;
}

.sola-donation-form-wrapper[dir="ltr"] {
    font-family: 'Inter', sans-serif;
    direction: ltr;
}

/* Form Container */
.sola-form-container {
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto;
}

/* Override theme container limitations */
.sola-donation-form-wrapper,
.sola-donation-form-wrapper *:not(input):not(select):not(textarea):not(button):not(svg):not(path) {
    max-width: none !important;
}

.sola-donation-form-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Elementor specific overrides */
.elementor-widget-container .sola-donation-form-wrapper,
.elementor-element .sola-donation-form-wrapper,
.elementor-section .sola-donation-form-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* WordPress content area overrides */
.entry-content .sola-donation-form-wrapper,
.post-content .sola-donation-form-wrapper,
.page-content .sola-donation-form-wrapper,
article .sola-donation-form-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* Form Card - Main unified container */
.sola-form-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100% !important;
    max-width: 100% !important;
}

/* Form Header - Now inside the card */
.sola-form-header {
    background: #023047;
    padding: 20px 28px;
    text-align: center;
    border-bottom: none;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
}

.sola-title {
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.sola-subtitle {
    color: var(--white);
    opacity: 0.85;
    font-size: 14px;
    margin: 0;
}

/* Language Toggle Button - REMOVED */
.sola-lang-toggle {
    display: none !important;
}

/* Progress Steps - Now inside card, compact */
.sola-progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0;
}

.sola-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sola-step.active {
    border-color: var(--accent-orange);
    background: rgba(244, 148, 49, 0.05);
}

.sola-step.completed {
    border-color: var(--security-green);
    background: rgba(34, 197, 94, 0.05);
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sola-step.active .step-number {
    background: var(--accent-orange);
    color: white;
}

.sola-step.completed .step-number {
    background: var(--security-green);
    color: white;
}

.sola-step.completed .step-number::before {
    content: '✓';
    font-size: 14px;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.sola-step.active .step-label {
    color: var(--accent-orange);
}

/* Form Sections - Now part of the card, no separate boxes */
.sola-form-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 28px 32px;
    margin-bottom: 0;
    box-shadow: none;
    display: none;
}

.sola-form-section.active {
    display: block;
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Title */
.sola-section-title {
    color: var(--primary-blue);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sola-section-icon {
    background: rgba(244, 148, 49, 0.1);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-orange);
}

.sola-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Security Badge */
.sola-security-badge {
    background: rgba(2, 48, 71, 0.05);
    border: 1px solid rgba(2, 48, 71, 0.1);
    border-radius: 10px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 600;
}

/* Form Rows */
.sola-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

/* Align monthly fields at bottom */
#chargeMonthlyRow {
    align-items: flex-end;
}

.sola-form-row:last-child {
    margin-bottom: 0;
}

.sola-form-field {
    flex: 1;
}

.sola-form-field.sola-full-width {
    flex: 1 1 100%;
}

/* Field Label */
.sola-field-label {
    display: block;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    min-height: 20px;
}

/* Input Wrapper */
.sola-input-wrapper {
    position: relative;
    width: 100%;
}

/* Input Fields - ENHANCED DESIGN - Maximum Specificity */
.sola-donation-form-wrapper .sola-input,
.sola-donation-form-wrapper input.sola-input,
.sola-donation-form-wrapper select.sola-input,
.sola-input {
    width: 100% !important;
    padding: 14px 14px 14px 14px !important;
    padding-left: 44px !important;
    background: var(--input-bg) !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 14px !important;
    color: var(--primary-blue) !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(2, 48, 71, 0.08) !important;
    -webkit-border-radius: 14px !important;
    -moz-border-radius: 14px !important;
    text-indent: 0 !important;
}

.sola-donation-form-wrapper[dir="rtl"] .sola-input,
[dir="rtl"] .sola-donation-form-wrapper .sola-input,
[dir="rtl"] .sola-input,
body[dir="rtl"] .sola-input {
    padding: 14px 44px 14px 14px !important;
    text-align: right !important;
    direction: rtl !important;
}

/* Force LTR for payment fields - credit card numbers must always be LTR */
.sola-donation-form-wrapper[dir="rtl"] #cardNumber,
.sola-donation-form-wrapper[dir="rtl"] #expiry,
.sola-donation-form-wrapper[dir="rtl"] #cvv,
[dir="rtl"] #cardNumber,
[dir="rtl"] #expiry,
[dir="rtl"] #cvv {
    direction: ltr !important;
    text-align: left !important;
    padding: 14px 14px 14px 44px !important;
}

[dir="ltr"] .sola-donation-form-wrapper .sola-input,
[dir="ltr"] .sola-input {
    padding: 14px 14px 14px 14px !important;
    padding-left: 44px !important;
    padding-right: 14px !important;
    text-align: left !important;
    text-indent: 0 !important;
}

.sola-donation-form-wrapper .sola-input:hover,
.sola-input:hover {
    border-color: rgba(244, 148, 49, 0.4) !important;
    box-shadow: 0 4px 12px rgba(2, 48, 71, 0.1) !important;
}

.sola-donation-form-wrapper .sola-input:focus,
.sola-input:focus {
    outline: none !important;
    background: white !important;
    border-color: #F49431 !important;
    box-shadow: 0 0 0 3px rgba(244, 148, 49, 0.1), 0 4px 12px rgba(2, 48, 71, 0.1) !important;
}

/* Enhanced Error State */
.sola-input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.03);
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.sola-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1), var(--shadow-md);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

/* Select Field Specific Styles */
select.sola-input {
    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='%23023047' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    cursor: pointer;
}

[dir="ltr"] select.sola-input {
    background-position: right 14px center;
    padding-right: 44px !important;
    padding-left: 44px !important;
}

[dir="rtl"] select.sola-input {
    background-position: left 14px center;
    padding-left: 44px !important;
    padding-right: 44px !important;
}

.sola-input::placeholder {
    color: rgba(2, 48, 71, 0.3);
}

/* Input Icon */
.sola-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s ease;
}

[dir="rtl"] .sola-icon {
    left: auto;
    right: 14px;
}

.sola-input:focus~.sola-icon,
.sola-input:hover~.sola-icon {
    color: var(--accent-orange);
    opacity: 1;
}

/* Floating Label */
.sola-label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    opacity: 0.5;
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
}

[dir="rtl"] .sola-label {
    left: auto;
    right: 44px;
}

[dir="ltr"] .sola-label {
    left: 44px;
    right: auto;
}

.sola-input:focus~.sola-label,
.sola-input:not(:placeholder-shown)~.sola-label {
    opacity: 0;
}

/* Enhanced Validation Icon */
.sola-validation-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

[dir="rtl"] .sola-validation-icon {
    right: auto;
    left: 14px;
}

.sola-validation-icon.valid,
.sola-validation-icon.invalid {
    opacity: 1;
}

.sola-validation-icon.valid {
    color: #22c55e;
    animation: bounceIn 0.4s ease;
}

.sola-validation-icon.invalid {
    color: #ef4444;
    animation: shake 0.4s ease;
}

@keyframes bounceIn {
    0% {
        transform: translateY(-50%) scale(0);
    }

    50% {
        transform: translateY(-50%) scale(1.1);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

/* Checkbox Field Styles */
.sola-checkbox-field {
    display: flex;
    align-items: center;
    flex: 1;
}

.sola-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 2px solid #e0e0e0;
    border-radius: 14px !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.sola-checkbox-wrapper:hover {
    border-color: rgba(244, 148, 49, 0.4);
    box-shadow: var(--shadow-md) !important;
}

.sola-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: var(--accent-orange);
    flex-shrink: 0;
}

.sola-checkbox-label {
    font-size: 14px;
    color: var(--primary-blue);
    cursor: pointer;
    user-select: none;
    flex: 1;
    line-height: 1.4;
}

/* Button Groups */
.sola-button-group {
    display: flex;
    gap: 10px;
}

.sola-option-btn {
    flex: 1;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    color: var(--primary-blue);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sola-option-btn:hover {
    border-color: #023047;
    background: #023047;
    color: white;
    box-shadow: var(--shadow-md);
}

.sola-option-btn.active {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
    border-color: var(--accent-orange);
    color: white;
    box-shadow: var(--shadow-lg);
}

/* Amount Buttons */
.sola-amount-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.sola-amount-btn {
    position: relative;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sola-amount-btn:hover {
    border-color: #023047;
    background: #023047;
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.sola-amount-btn.active {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
    color: white;
    border-color: var(--accent-orange);
    box-shadow: 0 4px 12px rgba(244, 148, 49, 0.3);
}

.amount-symbol {
    font-size: 14px;
    opacity: 0.8;
    margin-inline-end: 4px;
}

/* Custom Amount Button - Enhanced with Overlay */
.sola-custom-amount-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    background: linear-gradient(135deg, rgba(244, 148, 49, 0.1), rgba(244, 148, 49, 0.05));
    border: 2px dashed var(--accent-orange);
}

.sola-custom-amount-btn:hover {
    background: linear-gradient(135deg, rgba(244, 148, 49, 0.15), rgba(244, 148, 49, 0.08));
}

.sola-custom-amount-btn.active {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
    border-style: solid;
}

.sola-custom-amount-btn .custom-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-orange);
    transition: opacity 0.2s ease;
}

.sola-custom-amount-btn.active .custom-label {
    color: white;
}

.sola-custom-amount-btn .edit-icon {
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.2s ease;
    stroke: var(--accent-orange);
}

.sola-custom-amount-btn.active .edit-icon {
    stroke: white;
}

.sola-custom-amount-btn.editing .edit-icon {
    opacity: 0;
}

.sola-custom-amount-btn .currency-symbol {
    font-size: 18px;
    font-weight: 600;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sola-custom-amount-btn.editing .currency-symbol {
    opacity: 1;
}

.custom-amount-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sola-custom-amount-btn.editing .custom-amount-input {
    opacity: 1;
    pointer-events: auto;
}

.custom-amount-input:focus {
    outline: none;
}

/* Select Dropdown */
select.sola-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23023047' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

[dir="rtl"] select.sola-input {
    background-position: left 14px center;
    padding-right: 14px;
    padding-left: 44px;
}

/* Checkbox */
.sola-checkbox-wrapper {
    margin-top: 4px;
}

.sola-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sola-checkbox-label:hover {
    border-color: rgba(244, 148, 49, 0.4);
    box-shadow: var(--shadow-md);
}

.sola-checkbox {
    display: none;
}

.sola-checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sola-checkbox:checked~.sola-checkbox-custom {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
    border-color: var(--accent-orange);
}

.sola-checkbox:checked~.sola-checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.sola-checkbox-text {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 14px;
    flex: 1;
}

/* Card Type Logo - USING IMAGES */
.card-type-logo {
    position: absolute;
    right: 14px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    height: 22px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

[dir="rtl"] .card-type-logo {
    left: 14px;
    right: auto;
}

[dir="ltr"] .card-type-logo {
    right: 14px;
    left: auto;
}

.card-type-logo.visible {
    opacity: 1;
}

.card-type-logo img {
    height: 100%;
    width: auto;
}

/* Encryption Notice */
.sola-encryption-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-blue);
    opacity: 0.6;
    font-size: 12px;
    margin-top: 12px;
}

/* Navigation Buttons */
.sola-form-navigation {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.sola-form-navigation>* {
    flex: 1;
}

.sola-nav-btn {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sola-nav-btn.btn-back {
    background: #6b7280;
    color: white;
    flex-direction: row;
}

[dir="rtl"] .sola-nav-btn.btn-back {
    flex-direction: row-reverse;
}

.sola-nav-btn.btn-back:hover {
    background: #4b5563;
}

.sola-nav-btn.btn-next {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
    color: white;
    flex-direction: row;
}

[dir="rtl"] .sola-nav-btn.btn-next {
    flex-direction: row-reverse;
}

.sola-nav-btn.btn-next:hover {
    background: linear-gradient(135deg, var(--accent-orange-light), var(--accent-orange));
}

.nav-arrow {
    flex-shrink: 0;
}

[dir="rtl"] .nav-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .nav-arrow-left {
    transform: scaleX(-1);
}

.nav-text {
    white-space: nowrap;
}

/* Submit Button - REFINED - Visible in step 3 */
.sola-submit-btn,
button#submitBtn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #F49431 0%, #ff9d47 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
    margin-top: 0;
}

/* CRITICAL: Ensure button is hidden in steps 1 and 2 */
.sola-form-section[data-step="1"] .sola-submit-btn,
.sola-form-section[data-step="2"] .sola-submit-btn,
.sola-form-section[data-step="1"] button#submitBtn,
.sola-form-section[data-step="2"] button#submitBtn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.sola-submit-btn:hover {
    background: linear-gradient(135deg, var(--accent-orange-light), var(--accent-orange));
}

.sola-submit-btn:active {
    transform: scale(0.98);
}

.sola-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.heart-icon {
    transition: transform 0.2s ease;
}

.sola-submit-btn:hover .heart-icon {
    transform: scale(1.05);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: none;
}

.sola-submit-btn.loading .btn-text {
    display: none;
}

.sola-submit-btn.loading .spinner {
    display: block;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Back button for Step 3 - after wallet buttons */
.sola-back-btn-step3 {
    width: 100%;
    margin-top: 12px;
}

/* Payment Method Buttons */
.sola-payment-methods {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sola-payment-methods-title {
    text-align: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* Digital Wallet Buttons */
.sola-wallet-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    width: 100%;
}

/* Payment methods section - hidden by default */
.sola-payment-methods {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Hide both buttons by default */
.sola-wallet-btn.apple-pay,
.sola-wallet-btn.google-pay {
    display: none;
}

/* Show payment methods section ONLY when OS class is added */
.sola-donation-form-wrapper.is-apple .sola-payment-methods,
.sola-donation-form-wrapper.is-android .sola-payment-methods {
    display: block;
}

/* Apple OS (iOS/macOS with touch) - show Apple Pay only */
.sola-donation-form-wrapper.is-apple .sola-wallet-btn.apple-pay {
    display: flex !important;
}

/* Android OS - show Google Pay only */
.sola-donation-form-wrapper.is-android .sola-wallet-btn.google-pay {
    display: flex !important;
}

.sola-wallet-btn {
    flex: 1;
    padding: 12px 20px;
    background: #000;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 48px;
}

.sola-wallet-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sola-wallet-btn:active {
    transform: translateY(0);
}

/* Google Pay specific styling - light theme with white background */
.sola-wallet-btn.google-pay {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.sola-wallet-btn.google-pay:hover {
    background: #f8f9fa;
    border-color: #c6c6c6;
}

/* Apple Pay specific styling */
.sola-wallet-btn.apple-pay {
    background: #000;
}

.sola-wallet-btn.apple-pay:hover {
    background: #1a1a1a;
}

/* Logo sizes */
.google-pay-logo {
    height: 36px !important;
    width: auto !important;
    max-height: 36px !important;
}

.apple-pay-logo {
    height: 24px !important;
    width: auto !important;
    max-height: 24px !important;
}

/* Wallet buttons container - full width */
.sola-wallet-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

/* Wallet button - full width like donate button */
.sola-wallet-btn {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    width: 100% !important;
    max-width: 100% !important;
    flex: none;
    border-radius: 12px;
}

.sola-wallet-btn svg {
    width: auto;
    height: 24px;
    max-height: 24px;
}

/* Tooltip for placeholder status */
.sola-wallet-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-8px);
    }
}

/* Messages */
.sola-message {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sola-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #15803d;
}

.sola-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sola-donation-form-wrapper {
        padding: 20px 15px;
    }

    .sola-form-header {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }

    .sola-header-content {
        text-align: center;
    }

    .sola-title {
        font-size: 24px;
    }

    .sola-subtitle {
        font-size: 14px;
    }

    .sola-lang-toggle {
        width: 100%;
    }

    .sola-progress-steps {
        gap: 8px;
    }

    .step-label {
        font-size: 11px;
    }

    .sola-form-section {
        padding: 24px;
    }

    .sola-form-row {
        flex-direction: column;
        gap: 16px;
    }

    .sola-amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sola-custom-amount-btn {
        grid-column: 1 / -1;
    }

    .sola-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sola-form-navigation {
        flex-direction: column-reverse;
    }

    .sola-wallet-buttons {
        flex-direction: column;
    }
    
    .sola-security-footer {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .sola-security-divider {
        display: none;
    }
    
    .sola-security-badge {
        flex: 1 1 auto;
        justify-content: center;
    }
    
    /* Amount grid - 3 columns on tablet */
    .sola-amount-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sola-custom-amount-btn {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .sola-title {
        font-size: 18px;
    }

    .sola-subtitle {
        font-size: 12px;
    }

    .sola-section-title {
        font-size: 16px;
    }

    /* Amount grid - 2 columns on mobile */
    .sola-amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sola-custom-amount-btn {
        grid-column: span 2;
    }

    .step-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .sola-progress-steps {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .sola-step {
        padding: 8px 6px;
        gap: 5px;
    }
    
    .sola-form-header {
        padding: 16px 20px;
    }
    
    .sola-form-section {
        padding: 20px 16px;
    }
    
    .sola-security-footer {
        flex-direction: column;
        gap: 6px;
        padding: 10px 16px;
    }
    
    .sola-security-badge {
        font-size: 11px;
    }
    
    /* Checkbox label smaller on mobile */
    .sola-checkbox-label {
        font-size: 13px;
    }
}

/* ============================================
   Security Footer Styles
   ============================================ */
.sola-security-footer {
    background: linear-gradient(135deg, var(--security-green-bg) 0%, rgba(34, 197, 94, 0.04) 100%);
    border-top: 1px solid rgba(34, 197, 94, 0.2);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sola-security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #166534;
    font-weight: 500;
}

.sola-security-badge svg {
    color: var(--security-green);
    flex-shrink: 0;
}

.sola-security-divider {
    width: 1px;
    height: 18px;
    background: rgba(34, 197, 94, 0.3);
}

.sola-security-badge.sola-powered-by {
    gap: 4px;
}

.sola-security-badge.sola-powered-by strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Messages - adjust for new structure */
.sola-message {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

/* ========== LOADER OVERLAY STYLES ========== */
.sola-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    border-radius: 20px;
    min-height: 400px;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sola-loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sola-loader-content {
    text-align: center;
    padding: 40px;
}

/* Heart animation */
.sola-heart-loader {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
}

.sola-heart-loader svg {
    width: 100%;
    height: 100%;
    fill: var(--accent-orange);
    animation: solaHeartBeat 1.2s ease-in-out infinite;
}

@keyframes solaHeartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.15);
    }
    40% {
        transform: scale(1);
    }
    60% {
        transform: scale(1.2);
    }
}

.sola-loader-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.sola-loader-subtext {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* Progress bar */
.sola-progress-bar {
    width: 200px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.sola-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), #ffc107);
    border-radius: 3px;
    animation: solaProgressFill 2.5s ease-in-out infinite;
}

@keyframes solaProgressFill {
    0% {
        width: 0;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* Payment loader specific - Use accent orange to match donation button */
.sola-payment-loader .sola-heart-loader svg {
    fill: var(--accent-orange);
}

.sola-payment-loader .sola-progress-fill {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
}

/* Ensure wrapper has relative positioning for overlay */
.sola-donation-form-wrapper {
    position: relative;
}

/* ============================================================================
   iFields Styles - PCI Compliant Card Input Frames
   ============================================================================ */

/* iFrame wrapper styling */
.sola-ifield-wrapper {
    position: relative;
}

/* iFields iframe styling */
.sola-ifield-iframe {
    width: 100%;
    height: 48px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--input-bg);
    padding: 0;
    margin: 0;
    display: block;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sola-ifield-iframe:focus,
.sola-ifield-iframe.focused {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(2, 48, 71, 0.1);
    outline: none;
}

/* Valid state */
.sola-ifield-iframe.valid {
    border-color: var(--security-green);
}

/* Invalid state */
.sola-ifield-iframe.invalid {
    border-color: #ef4444;
}

/* Label styling for iFields */
.sola-ifield-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 14px;
    background: transparent;
    padding: 0 4px;
}

/* RTL positioning */
[dir="rtl"] .sola-ifield-label {
    right: 45px;
    left: auto;
}

[dir="ltr"] .sola-ifield-label {
    left: 45px;
    right: auto;
}

/* When iFrame has content or is focused, move label up */
.sola-ifield-wrapper.has-content .sola-ifield-label,
.sola-ifield-wrapper.focused .sola-ifield-label {
    top: 0;
    font-size: 11px;
    background: white;
    color: var(--primary-blue);
}

/* Error message styling */
.sola-ifield-error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

/* Card type logo positioning with iFields */
.sola-ifield-wrapper .card-type-logo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

[dir="rtl"] .sola-ifield-wrapper .card-type-logo {
    left: 12px;
    right: auto;
}

[dir="ltr"] .sola-ifield-wrapper .card-type-logo {
    right: 12px;
    left: auto;
}

/* Icon positioning for iFields */
.sola-ifield-wrapper .sola-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

[dir="rtl"] .sola-ifield-wrapper .sola-icon {
    right: 14px;
    left: auto;
}

[dir="ltr"] .sola-ifield-wrapper .sola-icon {
    left: 14px;
    right: auto;
}

/* Responsive adjustments for iFields */
@media (max-width: 480px) {
    .sola-ifield-iframe {
        height: 44px;
    }
    
    .sola-ifield-label {
        font-size: 13px;
    }
    
    .sola-ifield-wrapper.has-content .sola-ifield-label,
    .sola-ifield-wrapper.focused .sola-ifield-label {
        font-size: 10px;
    }
}