/* ════════════════════════════════════════════════════════════
   USARE KURBAN HİSSE SYSTEM PRO — CSS
   ════════════════════════════════════════════════════════════ */

body.wdm-modal-open {
    overflow: hidden !important;
}

/* ── MODAL DIALOG ───────────────────────────────────────────── */
.wdm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999 !important;
    display: none;
    box-sizing: border-box;
}

.wdm-modal[aria-hidden="false"] {
    display: block;
}

.wdm-modal .wdm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    animation: wdmFadeIn 0.2s ease forwards;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.wdm-modal .wdm-dialog {
    position: relative;
    z-index: 10;
    width: min(720px, calc(100% - 24px));
    margin: 6vh auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(12px);
    animation: wdmSlideIn 0.25s ease-out forwards;
    overflow: hidden;
}

.wdm-modal .wdm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
}

.wdm-modal .wdm-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* ── MODAL SAĞ ÜST KAPATMA (✕) İKONU ──────────────────────── */
.wdm-modal .wdm-close {
    font-size: 20px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: color 0.18s, transform 0.15s;
    user-select: none;
    line-height: 1;
}

.wdm-modal .wdm-close:hover {
    color: #111;
    transform: scale(1.15);
}

.wdm-modal .wdm-body {
    padding: 20px;
}

@keyframes wdmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes wdmSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── INLINE & MODAL HİSSEDAR KARTLARI ────────────────────────── */
.wdm-kurban-card {
    font-family: inherit;
}

/* Miktar alanını WooCommerce formlarında gizle */
form.cart .quantity {
    display: none !important;
}

/* Toplam Tutar Satırı */
.wdm-kurban-card .wdm-total {
    font-size: 1.05rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 18px;
    background: #f7f9fc;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wdm-kurban-card .wdm-total small {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
}

.wdm-kurban-card .wdm-total span {
    color: #83b735;
    font-size: 1.3rem;
    font-weight: 800;
}

/* Hissedar Satırı (Kisi Row) */
.wdm-kurban-card .kisi-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid #e7ecef;
    border-radius: 12px;
    background: #fafbfe;
    position: relative;
    box-sizing: border-box;
}

.wdm-kurban-card .kisi-row label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wdm-kurban-card input[type="text"],
.wdm-kurban-card input[type="tel"],
.wdm-kurban-card select {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #dcdfe6;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wdm-kurban-card input[type="text"]:focus,
.wdm-kurban-card input[type="tel"]:focus,
.wdm-kurban-card select:focus {
    outline: none;
    border-color: #83b735;
    box-shadow: 0 0 0 3px rgba(131, 183, 53, 0.12);
}

.wdm-kurban-card .hisse-fiyat {
    display: inline-flex;
    align-items: center;
    background: #f4f9ee;
    color: #83b735;
    border: 1px solid #e7f1d8;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 13px;
    white-space:nowrap;
    height: 38px;
    box-sizing: border-box;
}

/* Kaydırılabilir Hissedar Alanı (Sadece Popup için) */
.wdm-modal .wdm-kisiler {
    max-height: 52vh !important;
    min-height: 140px;
    overflow-y: auto !important;
    padding-right: 8px;
    margin-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: #83b735 #f4f9ee;
}

.wdm-modal .wdm-kisiler::-webkit-scrollbar {
    width: 6px;
}

.wdm-modal .wdm-kisiler::-webkit-scrollbar-thumb {
    background: #83b735;
    border-radius: 10px;
}

.wdm-modal .wdm-kisiler::-webkit-scrollbar-track {
    background: #f4f9ee;
}

/* Aksiyon Butonları */
.wdm-kurban-card .wdm-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

/* Hisse Ekle Butonu */
.wdm-kisi-ekle {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: rgba(131, 183, 53, 0.06) !important;
    color: #83b735 !important;
    border: 1.5px solid #83b735 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
}

.wdm-kisi-ekle:hover {
    background: #83b735 !important;
    color: #ffffff !important;
}

/* Sepete Ekle Butonu (Popup için) */
.wdm-submit {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: #83b735 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 13px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    margin-top: 5px !important;
    line-height: 1.2 !important;
}

.wdm-submit:hover {
    background: #72a22b !important;
    transform: translateY(-1px) !important;
}

.wdm-submit.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Hissedar Kaldırma Butonu (✕ Simgesi - Kartın Sağ Üstünde) */
.kisi-kaldir-btn {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #999 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: color 0.18s ease, transform 0.15s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10 !important;
    user-select: none !important;
}

.kisi-kaldir-btn:hover {
    color: #ef4444 !important; /* Kırmızı kapatma ikonu */
    transform: scale(1.15) !important;
}

.kisi-kaldir-btn[hidden] {
    display: none !important;
}

/* ── BAĞIŞ SEPETİ: DERLİ TOPLU HİSSEDAR LİSTESİ TASARIMI ── */
.wdm-hissedarlar-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
    width: 100%;
}

.wdm-hissedar-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #333;
    padding: 4px 0;
    border-bottom: 1px dashed #e8eaed;
}

.wdm-hissedar-item:last-child {
    border-bottom: none;
}

.wdm-h-no {
    font-weight: 700;
    color: #83b735;
}

.wdm-h-name {
    font-weight: 600;
    color: #222;
}

.wdm-h-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
}

.wdm-h-badge-tur {
    background: #eef2ff !important;
    color: #4f46e5 !important;
}

.wdm-h-badge-tel {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
}

.wdm-h-price {
    margin-left: auto;
    font-weight: 700;
    color: #83b735;
}

/* Arşiv sayfasındaki buton wrapper'ı */
.wdm-kurban-note {
    width: 100%;
    margin-top: 8px;
}

.wdm-kurban-note .button.wd-btn {
    width: 100%;
    text-align: center;
}

/* Elementor ve WoodMart overflow korumaları */
.products .product,
.products .product .product-wrapper,
.products .product .product-element-bottom {
    overflow: visible !important;
}

/* Mobil Uyum */
@media (max-width: 580px) {
    .wdm-modal .wdm-dialog {
        margin: 3vh auto;
    }
    .wdm-kurban-card .kisi-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .wdm-kurban-card .hisse-fiyat {
        justify-content: center;
    }
    .kisi-kaldir-btn {
        width: 100%;
    }
}
