/**
 * Mavera WooCommerce Donation Plugin - Widget Styles
 * Quick donation card - uses existing popup styles from frontend.css
 */

/* ========================================
   Donation Card
   ======================================== */

.dnf-donation-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    max-width: 380px;
    border: 1px solid #f0f0f0;
}

.dnf-donation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.dnf-card-category {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 8px;
}

.dnf-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.dnf-card-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Goal Section */
.dnf-card-goal {
    margin: 24px 0;
}

.dnf-goal-stats {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

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

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

.dnf-goal-bar {
    height: 10px;
    background: #e8e8e8;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.dnf-goal-progress {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.dnf-goal-supporters {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #27ae60;
}

/* Price */
.dnf-card-price {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 20px 0;
}

/* Actions - Mobile same height */
.dnf-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.dnf-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-height: 50px;
}

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

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

.dnf-btn-donate {
    background: #27ae60;
    color: white;
}

.dnf-btn-donate:hover {
    background: #219a52;
    color: white;
}

/* ========================================
   Widget Popup - Uses existing popup styles
   Positioned center with fixed positioning
   ======================================== */

.dnf-widget-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dnf-widget-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.dnf-widget-popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: dnfPopupSlideIn 0.3s ease-out;
}

.dnf-widget-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-widget-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* Popup Header */
.dnf-popup-header {
    margin-bottom: 24px;
}

.dnf-popup-category {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 4px;
}

.dnf-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Form - Match existing product page styles */
.dnf-popup-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dnf-popup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dnf-popup-field>label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Price Input - Match existing */
.dnf-price-field {
    padding-bottom: 18px;
    border-bottom: 2px solid #27ae60;
}

.dnf-price-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
}

.dnf-currency {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.dnf-price-input {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
}

.dnf-price-input::-webkit-inner-spin-button,
.dnf-price-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dnf-price-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.dnf-price-hint {
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

/* Text Input - Match existing product page */
.dnf-text-input,
.dnf-textarea-input,
.dnf-select-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
}

.dnf-text-input:focus,
.dnf-textarea-input:focus,
.dnf-select-input:focus {
    border-color: #27ae60;
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.dnf-textarea-input {
    min-height: 80px;
    resize: vertical;
}

/* Checkbox - Match existing product page checkbox style */
.dnf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dnf-checkbox-label:hover {
    border-color: #27ae60;
    background: #f0fff4;
}

.dnf-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #27ae60;
    flex-shrink: 0;
    margin-top: 2px;
}

.dnf-checkbox-label span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

/* Actions - Match existing popup buttons (Sepete Git / Ödemeye Geç style) */
.dnf-popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.dnf-popup-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Reduced gap */
    padding: 14px 10px;
    /* Reduced side padding */
    border-radius: 10px;
    font-size: 14px;
    /* Slightly smaller font */
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-height: 50px;
    white-space: nowrap;
    /* Prevent wrapping */
    min-width: 0;
    /* Allow shrinking */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bağış Yap - Blue like "Ödemeye Geç" */
.dnf-popup-btn.dnf-btn-checkout {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

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

/* Sepete Ekle - Gray like "Sepete Git" */
.dnf-popup-btn.dnf-btn-cart {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

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

/* Loading State */
.dnf-popup-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Error styles */
.dnf-text-input.error,
.dnf-textarea-input.error {
    border-color: #e74c3c;
}

.dnf-error {
    color: #e74c3c;
    padding: 10px 15px;
    background: #fdf2f2;
    border-radius: 8px;
    font-size: 14px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 480px) {
    .dnf-donation-card {
        padding: 20px;
    }

    .dnf-card-title {
        font-size: 18px;
    }

    /* Mobile - Popup centered, not bottom sheet */
    .dnf-widget-popup {
        padding: 15px;
    }

    .dnf-widget-popup-content {
        padding: 24px;
        max-height: 85vh;
    }

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

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