/* Niaz Foundation Donation Form Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

.nfd-donation-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 40px;
    position: relative;
    z-index: 1;
    display: block;
}

.nfd-step {
    padding: 0;
}

/* Header Section */
.nfd-header {
    margin-bottom: 32px;
}

.nfd-header .nfd-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
}

.nfd-header .nfd-step-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.nfd-header .nfd-back-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    margin-right: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
    border-radius: 8px;
    position: absolute;
    left: 0;
}

.nfd-header .nfd-back-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.nfd-progress-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.nfd-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfd-progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.nfd-progress-step.active {
    background: #10b981;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transform: scale(1.1);
}

.nfd-progress-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    border-radius: 1px;
}

/* Amount Selection - 2x3 Grid Layout */
.nfd-amount-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.nfd-amount-btn {
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #374151;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    outline: none;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.nfd-amount-btn:hover {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.nfd-amount-btn.selected {
    border-color: #10b981;
    background: #f0fdf4;
    color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nfd-other-amount-input {
    margin-bottom: 24px;
}

.nfd-other-amount-input input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.nfd-other-amount-input input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Donation Info */
.nfd-donation-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.nfd-info-icon {
    font-size: 20px;
    color: #10b981;
    flex-shrink: 0;
}

/* Donation Type */
.nfd-donation-type {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.nfd-type-btn {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nfd-type-btn:hover {
    border-color: #10b981;
    background: #f0fdf4;
    color: #10b981;
    transform: translateY(-1px);
}

.nfd-type-btn.active {
    border-color: #10b981;
    background: #f0fdf4;
    color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    font-weight: 700;
}

/* Action Buttons Container */
.nfd-action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Sponsor Button */
.nfd-sponsor-btn {
    flex: 1;
    padding: 18px 24px;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nfd-sponsor-btn:hover {
    border-color: #10b981;
    background: #f0fdf4;
    color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.15);
}

/* Continue Button */
.nfd-continue-btn {
    width: 100%;
    padding: 18px 24px;
    background: #Eca30c;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(236, 163, 12, 0.2);
    box-sizing: border-box;
    outline: none;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.nfd-continue-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(236, 163, 12, 0.3);
}

.nfd-arrow-right {
    font-size: 18px;
    font-weight: 400;
}

/* Step Header */
.nfd-step-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    position: relative;
}

.nfd-step-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    text-align: center;
}

/* Form Styles */
.nfd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    /* margin-bottom: 20px; */
}

.nfd-form-group {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

.nfd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.nfd-required {
    color: #ef4444;
}

.nfd-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.nfd-input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    color: #6b7280;
    z-index: 1;
    pointer-events: none;
}

.nfd-form-group input,
.nfd-form-group select,
.nfd-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    padding-left: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: white;
}

.nfd-form-group input:focus,
.nfd-form-group select:focus,
.nfd-form-group textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nfd-form-group input.error {
    border-color: #ef4444;
}

.nfd-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.nfd-error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

/* Address Section */
.nfd-address-section {
    margin-bottom: 32px;
}

.nfd-address-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.nfd-address-section .nfd-form-row {
    margin-bottom: 16px;
}

.nfd-address-section .nfd-form-group {
    margin-bottom: 16px;
}

.nfd-search-btn {
    padding: 14px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    align-self: end;
}

.nfd-search-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.nfd-search-btn:active {
    transform: translateY(0);
}

.nfd-search-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nfd-search-btn:disabled:hover {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
}

.nfd-search-btn.success {
    background: #10b981;
    color: white;
}

.nfd-search-btn.error {
    background: #ef4444;
    color: white;
}

/* Checkbox Styles */
.nfd-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    /* margin-bottom: 16px; */
    cursor: pointer;
    padding: 12px 0 0 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.nfd-checkbox:hover {
    background: #f9fafb;
}

.nfd-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #10b981;
}

/* Contact Preferences */
.nfd-contact-preferences {
    margin-bottom: 32px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.nfd-contact-preferences p {
    margin-bottom: 20px;
    color: #6b7280;
    line-height: 1.6;
    font-size: 14px;
}

.nfd-contact-section {
    margin-bottom: 20px;
}

.nfd-contact-section:last-child {
    margin-bottom: 0;
}

.nfd-contact-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    /* margin-bottom: 12px; */
    position: relative;
    padding-left: 20px;
    margin: 0;
}

.nfd-contact-section h4::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    font-weight: bold;
}

/* Payment Methods */
.nfd-payment-methods {
    margin-bottom: 32px;
}

.nfd-payment-methods h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

.nfd-payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nfd-payment-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nfd-payment-square {
    padding: 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nfd-payment-square:hover {
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.15);
}

.nfd-payment-square.active {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nfd-payment-square .nfd-payment-icon {
    width: 32px;
    height: 32px;
}

.nfd-payment-square .nfd-payment-icon svg {
    width: 100%;
    height: 100%;
    color: #6b7280;
}

.nfd-payment-square .nfd-payment-text {
    text-align: center;
}

.nfd-payment-square .nfd-payment-title {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.nfd-payment-square.active .nfd-payment-title {
    color: #10b981;
}

.nfd-payment-btn {
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    outline: none;
    text-decoration: none;
    font-family: inherit;
    width: 100%;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.nfd-payment-btn:last-child {
    margin-bottom: 0;
}

.nfd-payment-btn.active {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nfd-payment-btn:hover {
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.15);
}

.nfd-payment-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nfd-payment-icon svg {
    width: 100%;
    height: 100%;
    color: #6b7280;
}

.nfd-apple-pay-icon {
    color: #000;
}

/* Full width Apple Pay button */
.nfd-apple-pay-full {
    width: 100% !important;
    display: none !important; /* Hidden by default, shown only on iOS */
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.nfd-apple-pay-full.show {
    display: flex !important;
}

.nfd-apple-pay-full .nfd-payment-icon {
    flex-shrink: 0;
}

.nfd-apple-pay-full .nfd-payment-text {
    flex: 1;
    text-align: left;
}

/* Apple Pay button fade animation */
.nfd-apple-pay-full {
    transition: all 0.3s ease;
}

.nfd-apple-pay-full:active {
    opacity: 0.7;
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nfd-apple-pay-full:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Full width Google Pay button */
.nfd-google-pay-full {
    width: 100% !important;
    display: none !important; /* Hidden by default, shown only on Android */
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.nfd-google-pay-full.show {
    display: flex !important;
}

.nfd-google-pay-full .nfd-payment-icon {
    flex-shrink: 0;
}

.nfd-google-pay-full .nfd-payment-text {
    flex: 1;
    text-align: left;
}

/* Google Pay button fade animation */
.nfd-google-pay-full {
    transition: all 0.3s ease;
}

.nfd-google-pay-full:active {
    opacity: 0.7;
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nfd-google-pay-full:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nfd-google-pay-icon {
    color: #4285f4;
}

.nfd-upi-icon {
    color: #6366f1;
}

.nfd-paytm-icon {
    color: #059669;
}

.nfd-phonepe-icon {
    color: #7c3aed;
}

.nfd-card-icon {
    color: #6b7280;
}

.nfd-payment-btn.active .nfd-apple-pay-icon {
    color: #000;
}

.nfd-payment-btn.active .nfd-google-pay-icon {
    color: #4285f4;
}

.nfd-payment-btn.active .nfd-upi-icon {
    color: #6366f1;
}

.nfd-payment-btn.active .nfd-paytm-icon {
    color: #059669;
}

.nfd-payment-btn.active .nfd-phonepe-icon {
    color: #7c3aed;
}

.nfd-payment-btn.active .nfd-card-icon {
    color: #10b981;
}

.nfd-payment-btn .nfd-payment-text {
    flex-grow: 1;
    text-align: left;
}

.nfd-payment-title {
    font-weight: 600;
    font-size: 16px;
    color: #374151;
    margin-bottom: 4px;
}

.nfd-payment-btn.active .nfd-payment-title {
    color: #10b981;
}

.nfd-payment-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.nfd-payment-btn.active .nfd-payment-description {
    color: #10b981;
}

/* Gift Aid Section */
.nfd-gift-aid-section {
    margin-bottom: 32px;
}

.nfd-gift-aid-box {
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.nfd-gift-aid-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.5;
}

.nfd-gift-aid-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.nfd-read-more {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

.nfd-read-more:hover {
    color: #059669;
}

.nfd-gift-aid-details {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.nfd-gift-aid-disclaimer {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

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

.nfd-gift-aid-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.nfd-gift-aid-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.nfd-gift-aid-radio-label:hover {
    border-color: #Eca30c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(236, 163, 12, 0.15);
}

.nfd-gift-aid-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.nfd-gift-aid-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nfd-gift-aid-radio:checked + .nfd-gift-aid-radio-custom {
    border-color: #Eca30c;
    background: #Eca30c;
}

.nfd-gift-aid-radio:checked + .nfd-gift-aid-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.nfd-gift-aid-radio:checked ~ .nfd-gift-aid-radio-text {
    color: #Eca30c;
}

.nfd-gift-aid-radio-label:has(.nfd-gift-aid-radio:checked),
.nfd-gift-aid-radio-label.checked {
    border-color: #Eca30c;
    background: #fff7ed;
    box-shadow: 0 4px 12px rgba(236, 163, 12, 0.2);
}

.nfd-gift-aid-radio-text {
    font-weight: 600;
    color: #374151;
    transition: color 0.2s ease;
}

/* Payment Form */
.nfd-payment-form {
    margin-bottom: 32px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

#card-element {
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    transition: all 0.2s ease;
}

#card-element:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#card-errors {
    margin-top: 12px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
    color: #ef4444;
    font-size: 14px;
}

.nfd-error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

/* Donate Button */
.nfd-donate-btn {
    width: 100%;
    padding: 18px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nfd-donate-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* Success Message */
.nfd-success {
    text-align: center;
    padding: 40px 20px;
}

.nfd-success-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.nfd-success-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.nfd-new-donation-btn {
    padding: 14px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nfd-new-donation-btn:hover {
    background: #059669;
}

button#step-1-continue, button#step-2-continue {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-weight: 700 !important;
    border: 2px solid #Eca30c !important;
    width: 180px !important;
    font-size: 14px !important;
}
.nfd-continue-btn:hover {
    background: #eca30c00 !important;
    transform: translateY(-1px) !important;
    color: #Eca30c !important;
    border: 2px solid #Eca30c !important;
}
/* Responsive Design */
@media (max-width: 600px) {
    input#first-name, input#last-name, input#email, input#phone, input#postcode
    
     {
            padding: 10px 50px !important;
        }
        .nfd-form-group {
            margin-bottom: 20px !important;
            position: relative !important;
            width: 100% !important;
        }
    .nfd-donation-container {
        margin: 0 16px;
        padding: 24px;
        border-radius: 12px;
    }

    .nfd-step {
        padding: 0;
    }

    .nfd-amount-selection {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
    }
    .nfd-donation-type {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .nfd-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nfd-step-title {
        font-size: 20px;
    }

    .nfd-address-section .nfd-form-row {
        grid-template-columns: 1fr;
    }

    .nfd-search-btn {
        width: 100%;
        margin-top: 8px;
    }

    .nfd-payment-row {
        grid-template-columns: 1fr;
    }

    .nfd-gift-aid-radio-label {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Manual Address Fields */
.nfd-manual-address-fields {
    margin-top: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.3s ease;
}

.nfd-manual-address-fields .nfd-form-group {
    margin-bottom: 16px;
}

.nfd-manual-address-fields .nfd-form-group:last-child {
    margin-bottom: 0;
}

.nfd-manual-address-fields .nfd-form-row {
    margin-bottom: 16px;
}

.nfd-manual-address-fields .nfd-form-row:last-child {
    margin-bottom: 0;
}

.nfd-manual-address-fields .nfd-form-row .nfd-form-group {
    margin-bottom: 0;
}

.nfd-manual-address-fields textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: white;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.nfd-manual-address-fields textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nfd-manual-address-fields select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.nfd-manual-address-fields select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nfd-manual-address-fields input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: white;
}

.nfd-manual-address-fields input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nfd-manual-address-fields input::placeholder {
    color: #9ca3af;
}

.nfd-gift-aid-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    font-style: italic;
}

/* Show manual address fields when checkbox is checked */
.nfd-manual-address-fields {
    display: none;
}

.nfd-manual-address-fields.show {
    display: block;
}

/* Mobile Responsive for Manual Address Fields */
@media (max-width: 600px) {
    .nfd-manual-address-fields .nfd-form-row {
        grid-template-columns: 1fr;
    }

    .nfd-manual-address-fields .nfd-form-group {
        margin-bottom: 16px;
    }

    .nfd-manual-address-fields textarea,
    .nfd-manual-address-fields select,
    .nfd-manual-address-fields input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .nfd-manual-address-fields input {
        padding: 14px 16px;
    }
}

/* Apple Pay Button Container */
#apple-pay-button {
    margin-top: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

#google-pay-button {
    margin-top: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

#apple-pay-button .stripe-payment-request-button {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    border: none;
    background: #000;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#apple-pay-button .stripe-payment-request-button:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#apple-pay-button .stripe-payment-request-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
} 

/* Enhanced Country Code Select Styling */
.nfd-country-code-select {
    flex-shrink: 0;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    max-width: 120px;
    box-sizing: border-box;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.nfd-country-code-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nfd-country-code-select:hover {
    border-color: #d1d5db;
}

.nfd-country-code-select option {
    padding: 8px;
    font-size: 14px;
}

/* Phone Input Container with Country Code */
.nfd-phone-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
}

.nfd-phone-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
    outline: none;
}

.nfd-phone-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.nfd-phone-input::placeholder {
    color: #9ca3af;
}

/* Mobile responsive styles for phone input */
@media (max-width: 600px) {
    .nfd-phone-input-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .nfd-country-code-select {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .nfd-phone-input {
        width: 100%;
    }
}

/* Focus styles for the entire phone input container */
.nfd-phone-input-container:focus-within .nfd-country-code-select {
    border-color: #10b981;
}

.nfd-phone-input-container:focus-within .nfd-phone-input {
    border-color: #10b981;
}

/* Body scroll lock when popup is open */
body.nfd-popup-open {
    overflow: hidden;
}

/* UK Address Lookup Popup Modal */
.nfd-address-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.nfd-address-popup-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nfd-address-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.nfd-address-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.nfd-address-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nfd-address-popup-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.nfd-address-popup-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.nfd-address-loading {
    text-align: center;
    padding: 40px 20px;
}

.nfd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.nfd-address-loading p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

.nfd-address-results {
    margin-bottom: 16px;
}

.nfd-address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* .nfd-address-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}
 */
.nfd-address-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.nfd-address-option.selected {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.nfd-address-option input[type="radio"] {
    margin: 0;
    margin-top: 2px;
    accent-color: #10b981;
    width: 18px;
    height: 18px;
}
.nfd-address-popup-btn {
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
}
.nfd-address-option-content {
    flex: 1;
}
.nfd-address-popup-close {
    background: none;
    border: none;
    font-size: 24px !important;
    /* color: #6b7280 !important; */
    cursor: pointer;
    padding: 4px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nfd-address-option-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.nfd-address-option-content p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.nfd-address-error {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

.nfd-address-error p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.nfd-address-popup-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

.nfd-address-popup-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.nfd-address-popup-cancel {
    background: #f3f4f6;
    color: #374151;
}

.nfd-address-popup-cancel:hover {
    background: #e5e7eb;
}

.nfd-address-popup-confirm {
    background: #10b981;
    color: white;
}

.nfd-address-popup-confirm:hover:not(:disabled) {
    background: #059669;
}

.nfd-address-popup-confirm:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Mobile responsive for popup */
@media (max-width: 600px) {
    .nfd-address-popup-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .nfd-address-popup-header {
        padding: 20px 20px 12px 20px;
    }
    
    .nfd-address-popup-header h3 {
        font-size: 18px;
    }
    
    .nfd-address-popup-body {
        padding: 20px;
        max-height: 350px;
    }
    
    .nfd-address-popup-footer {
        padding: 12px 20px 20px 20px;
        flex-direction: column;
    }
    
    .nfd-address-popup-btn {
        width: 100%;
    }
}

