/**
 * Donation Name Fields - Frontend Styles
 */

/* Container */
.dnf-donation-fields-wrapper {
    margin: 20px 0;
    padding: 0;
    background: transparent !important;
}

/* Label */
.dnf-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333 !important;
    margin-bottom: 5px;
}

/* Required indicator with tooltip */
.dnf-required {
    color: #e74c3c;
    font-weight: 700;
    position: relative;
    cursor: help;
}

.dnf-required::after {
    content: "Bu alan zorunludur";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.dnf-required:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Hide the old text */
.dnf-required-text {
    display: none !important;
}

/* Fields Container */
#dnf-fields-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Field Row */
.dnf-field-row {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: dnf-fadeIn 0.3s ease;
}

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

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

/* Field Number */
.dnf-field-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* Input Field */
.dnf-donation-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.dnf-donation-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.dnf-donation-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.dnf-donation-input:hover {
    border-color: #bdbdbd;
}

/* Responsive */
@media (max-width: 480px) {
    .dnf-donation-fields-wrapper {
        padding: 15px;
        margin: 15px 0;
    }

    .dnf-label {
        font-size: 14px;
    }

    .dnf-donation-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .dnf-field-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dnf-donation-fields-wrapper {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }

    .dnf-label {
        color: #e2e8f0;
        border-bottom-color: #4299e1;
    }

    .dnf-donation-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .dnf-donation-input:focus {
        border-color: #4299e1;
        box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    }

    .dnf-donation-input::placeholder {
        color: #718096;
    }
}

/* Edit Form Styles (Cart/Checkout) */
.dnf-edit-form {
    margin: 10px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.dnf-edit-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.dnf-edit-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dnf-edit-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.dnf-edit-input:focus {
    border-color: #3498db;
}

.dnf-edit-actions {
    display: flex;
    gap: 8px;
}

.dnf-save-btn,
.dnf-cancel-btn {
    padding: 6px 14px;
    font-size: 13px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.dnf-save-btn {
    background: #3498db;
    color: #fff;
}

.dnf-save-btn:hover {
    background: #2980b9;
}

.dnf-save-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.dnf-cancel-btn {
    background: #e0e0e0;
    color: #333;
}

.dnf-cancel-btn:hover {
    background: #ccc;
}

/* Edit button link styling */
.dnf-edit-names-btn {
    display: inline-block;
    font-size: 12px !important;
    color: #3498db !important;
    text-decoration: underline !important;
    cursor: pointer;
    margin-top: 5px;
}

.dnf-edit-names-btn:hover {
    color: #2980b9 !important;
}

/* ================================
   ELEMENTOR & THEME COMPATIBILITY
   Improved vertical layout for add to cart forms
   ================================ */

/* Force vertical layout for our wrappers */
.dnf-open-pricing-wrapper,
.dnf-donation-fields-wrapper,
.dnf-goal-wrapper {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    float: none !important;
    flex: none !important;
}

/* Open Pricing Styles - Compact */
.dnf-open-pricing-wrapper {
    margin: 0 !important;
    padding: 10px 12px !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    border: 1px solid #e9ecef !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.dnf-price-input-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dnf-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Price +/- buttons - same style as quantity */
.dnf-price-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
}

.dnf-price-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.dnf-open-price-input {
    padding: 8px 4px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100px;
    text-align: center;
    transition: all 0.2s ease;
    background: #fff;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Hide default spin buttons on price input */
.dnf-open-price-input::-webkit-outer-spin-button,
.dnf-open-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.dnf-open-price-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
    outline: none;
}

.dnf-price-hint {
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 6px;
    display: inline-block;
}

.dnf-open-price-range {
    font-style: italic;
    color: #6c757d;
}

/* Donation Name Fields - Compact Layout */
.dnf-donation-fields-wrapper {
    margin: 8px 0 12px 0 !important;
    padding: 12px !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    border: 1px solid #e9ecef !important;
}

.dnf-donation-fields-wrapper .dnf-label {
    font-size: 15px;
    margin-bottom: 8px;
}

#dnf-fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

/* Copy to All button */
.dnf-copy-all-btn {
    font-size: 12px;
    color: #3498db;
    text-decoration: none;
    margin-left: 36px;
    margin-top: -4px;
    display: inline-block;
}

.dnf-copy-all-btn:hover {
    color: #2980b9;
    text-decoration: underline;
}

.dnf-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dnf-donation-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
}

/* Custom Checkboxes Styles */
.dnf-custom-checkboxes-wrapper {
    margin: 0 0 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    order: 5 !important;
}

.dnf-checkbox-row {
    padding: 8px 0;
}

.dnf-checkbox-row:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.dnf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.dnf-custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dnf-checkbox-title {
    font-weight: 500;
    color: #333;
}

.dnf-checkbox-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #6c757d;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    margin-left: 4px;
    position: relative;
}

.dnf-checkbox-tooltip::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    margin-bottom: 5px;
    max-width: 200px;
    white-space: normal;
    text-align: center;
}

.dnf-checkbox-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.dnf-checkbox-description {
    font-size: 12px;
    color: #6c757d;
    margin: 4px 0 0 26px;
}

/* Selectbox Styles */
.dnf-select-label {
    display: block;
    margin-bottom: 8px;
}

.dnf-custom-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    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 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.dnf-custom-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.dnf-custom-select[multiple] {
    padding: 8px;
    background-image: none;
    height: auto;
    min-height: 80px;
}

.dnf-custom-select[multiple] option {
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.dnf-custom-select[multiple] option:checked {
    background: #e3f2fd;
}

/* Multi-select as checkbox list */
.dnf-multi-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

.dnf-multi-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dnf-multi-option:hover {
    background: #e9ecef;
}

.dnf-multi-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.dnf-multi-option input[type="checkbox"]:checked+span {
    color: #2980b9;
    font-weight: 500;
}

/* Note Field Styles */
.dnf-note-wrapper {
    margin: 0 0 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    order: 5 !important;
}

.dnf-note-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.dnf-note-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
}

.dnf-note-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Multiple notes container */
#dnf-notes-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dnf-note-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dnf-note-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    font-weight: 600;
    font-size: 12px;
    border-radius: 50%;
    margin-top: 6px;
}

.dnf-note-row .dnf-note-textarea {
    flex: 1;
    min-height: 50px;
}

/* Goal Progress Bar Styles - Improved */
.dnf-goal-wrapper {
    margin: 0 0 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.dnf-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.dnf-goal-raised {
    font-weight: 700;
    color: #27ae60;
    font-size: 16px;
}

.dnf-goal-target {
    color: #6c757d;
    font-size: 14px;
}

.dnf-progress-bar {
    width: 100%;
    height: 24px;
    background: #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dnf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71, #27ae60);
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.8s ease;
    animation: dnf-shimmer 2s infinite linear;
}

@keyframes dnf-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.dnf-goal-percentage {
    text-align: center;
    margin-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
}

/* Mobile Responsive - Compact */
@media (max-width: 768px) {

    .dnf-open-pricing-wrapper,
    .dnf-donation-fields-wrapper,
    .dnf-goal-wrapper {
        padding: 10px !important;
        margin: 0 0 8px 0 !important;
    }

    /* Stack price and quantity on mobile */
    .dnf-open-pricing-wrapper {
        flex: 0 0 100% !important;
    }

    .elementor-add-to-cart .quantity,
    .elementor-widget-woocommerce-product-add-to-cart .quantity,
    form.cart .quantity {
        flex: 0 0 100% !important;
    }

    .dnf-price-input-container {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .dnf-open-price-input {
        width: 80px;
    }

    .dnf-goal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dnf-goal-percentage {
        font-size: 14px;
        margin-top: 6px;
    }

    .dnf-progress-bar {
        height: 16px;
    }

    .dnf-field-row {
        padding: 8px !important;
        gap: 8px;
    }

    .dnf-donation-input {
        padding: 8px 10px;
        font-size: 14px;
    }

    .dnf-field-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* ================================
   ELEMENTOR FIX - Comprehensive
   ================================ */

/* Reset box sizing */
.dnf-open-pricing-wrapper,
.dnf-open-pricing-wrapper *,
.dnf-donation-fields-wrapper,
.dnf-donation-fields-wrapper *,
.dnf-goal-wrapper,
.dnf-goal-wrapper * {
    box-sizing: border-box !important;
}

/* Force the form to be a column layout */
.elementor-add-to-cart form.cart,
.elementor-widget-woocommerce-product-add-to-cart form.cart {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 15px !important;
}

/* Ensure our wrappers take full width and don't flex inline */
.elementor-add-to-cart .dnf-goal-wrapper,
.elementor-add-to-cart .dnf-open-pricing-wrapper,
.elementor-add-to-cart .dnf-donation-fields-wrapper,
.elementor-widget-woocommerce-product-add-to-cart .dnf-goal-wrapper,
.elementor-widget-woocommerce-product-add-to-cart .dnf-open-pricing-wrapper,
.elementor-widget-woocommerce-product-add-to-cart .dnf-donation-fields-wrapper,
form.cart .dnf-goal-wrapper,
form.cart .dnf-open-pricing-wrapper,
form.cart .dnf-donation-fields-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    flex-shrink: 0 !important;
    margin: 0 0 8px 0 !important;
}

/* Goal comes first */
.dnf-goal-wrapper {
    order: 1 !important;
    padding: 12px !important;
    margin-bottom: 8px !important;
}

/* Combined Price + Quantity Row */
.elementor-add-to-cart form.cart,
.elementor-widget-woocommerce-product-add-to-cart form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* Open pricing - left side, 60% */
.dnf-open-pricing-wrapper {
    order: 2 !important;
    flex: 0 0 calc(60% - 4px) !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    border: 1px solid #e9ecef !important;
    padding: 12px !important;
    margin: 0 !important;
}

/* Quantity field - compact, same height as price */
.elementor-add-to-cart .quantity,
.elementor-widget-woocommerce-product-add-to-cart .quantity,
form.cart .quantity {
    order: 3 !important;
    flex: 0 0 calc(40% - 4px) !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    border: 1px solid #e9ecef !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    height: auto !important;
    min-height: auto !important;
}

/* Quantity label - inline */
.elementor-add-to-cart .quantity::before,
.elementor-widget-woocommerce-product-add-to-cart .quantity::before,
form.cart .quantity::before {
    content: "Adet:" !important;
    display: inline !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    white-space: nowrap !important;
}

/* Quantity buttons - minus first, plus last */
.elementor-add-to-cart .quantity .minus,
.elementor-widget-woocommerce-product-add-to-cart .quantity .minus,
form.cart .quantity .minus {
    order: 1 !important;
}

.elementor-add-to-cart .quantity .qty,
.elementor-widget-woocommerce-product-add-to-cart .quantity .qty,
form.cart .quantity .qty {
    order: 2 !important;
}

.elementor-add-to-cart .quantity .plus,
.elementor-widget-woocommerce-product-add-to-cart .quantity .plus,
form.cart .quantity .plus {
    order: 3 !important;
}

/* Quantity input - same style as price input */
.elementor-add-to-cart .quantity .qty,
.elementor-widget-woocommerce-product-add-to-cart .quantity .qty,
form.cart .quantity .qty {
    position: relative !important;
    width: 70px !important;
    padding: 8px 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    background: #fff !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Hide default spin buttons on number input */
.elementor-add-to-cart .quantity .qty::-webkit-outer-spin-button,
.elementor-add-to-cart .quantity .qty::-webkit-inner-spin-button,
.elementor-widget-woocommerce-product-add-to-cart .quantity .qty::-webkit-outer-spin-button,
.elementor-widget-woocommerce-product-add-to-cart .quantity .qty::-webkit-inner-spin-button,
form.cart .quantity .qty::-webkit-outer-spin-button,
form.cart .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
}

/* Force reset position absolute on buttons - compact */
.elementor-add-to-cart .quantity button,
.elementor-add-to-cart .quantity .minus,
.elementor-add-to-cart .quantity .plus,
.elementor-widget-woocommerce-product-add-to-cart .quantity button,
.elementor-widget-woocommerce-product-add-to-cart .quantity .minus,
.elementor-widget-woocommerce-product-add-to-cart .quantity .plus,
form.cart .quantity button,
form.cart .quantity .minus,
form.cart .quantity .plus {
    position: static !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    background: #fff !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.elementor-add-to-cart .quantity button:hover,
.elementor-widget-woocommerce-product-add-to-cart .quantity button:hover,
form.cart .quantity button:hover {
    background: #e9ecef !important;
}

/* Donation names after quantity */
.dnf-donation-fields-wrapper {
    order: 4 !important;
}

/* Button last */
.elementor-add-to-cart .single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button,
form.cart .single_add_to_cart_button {
    order: 5 !important;
    width: 100% !important;
    margin-top: 10px !important;
}

/* Hide inline styles from Elementor */
.elementor-add-to-cart form.cart>* {
    flex: 0 0 auto !important;
}

/* ========================================
   Add to Cart Popup Styles
   ======================================== */

.dnf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dnf-popup-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: dnfPopupSlideIn 0.3s ease-out;
}

@keyframes dnfPopupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

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

.dnf-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.dnf-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

.dnf-popup-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.dnf-popup-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

#dnf-popup-product-name {
    color: #2196F3;
}

.dnf-popup-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
}

.dnf-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.dnf-popup-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dnf-popup-btn-cart {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.dnf-popup-btn-cart:hover {
    background: #e8e8e8;
    color: #333;
}

.dnf-popup-btn-checkout {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
}

.dnf-popup-btn-checkout:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .dnf-popup-content {
        padding: 30px 20px;
    }

    .dnf-popup-buttons {
        flex-direction: column;
    }

    .dnf-popup-btn {
        width: 100%;
    }
}

/* ========================================
   Gift Aid Styles
   ======================================== */

.dnf-gift-aid-wrapper {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.dnf-gift-aid-header {
    margin-bottom: 15px;
}

.dnf-gift-aid-logo {
    width: 120px;
    height: 35px;
}

.dnf-gift-aid-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dnf-gift-aid-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dnf-gift-aid-label:hover {
    border-color: #28a745;
    background: #f8fff9;
}

.dnf-gift-aid-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    accent-color: #28a745;
    flex-shrink: 0;
}

.dnf-gift-aid-checkbox-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.dnf-gift-aid-info {
    padding: 12px 15px;
    background: #e8f5e9;
    border-radius: 8px;
}

.dnf-gift-aid-boost {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #2e7d32;
}

.dnf-gift-aid-boost strong {
    color: #1b5e20;
    font-size: 17px;
}

.dnf-gift-aid-charity {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.dnf-gift-aid-legal {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    margin: 5px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

/* Responsive */
@media (max-width: 480px) {
    .dnf-gift-aid-wrapper {
        padding: 15px;
    }

    .dnf-gift-aid-label {
        padding: 12px;
    }

    .dnf-gift-aid-checkbox-text {
        font-size: 14px;
    }
}