/* ═════════════════════════════════════════════════════════════════════
   ipower2 STANDART TABLO EXPORT GROUP — CSV/Excel/PDF segmented pill
   Kullanım:
     <div class="ip-tbl-exp-group" data-grid-var="myGridApi" data-filename="dosyaadi">
         <button type="button" class="ip-tbl-exp-btn ip-tbl-exp-btn--csv" data-fmt="csv"
                 title="CSV indir"><i class="fas fa-file-csv"></i><span>CSV</span></button>
         <button type="button" class="ip-tbl-exp-btn ip-tbl-exp-btn--xls" data-fmt="xls"
                 title="Excel indir"><i class="fas fa-file-excel"></i><span>Excel</span></button>
         <button type="button" class="ip-tbl-exp-btn ip-tbl-exp-btn--pdf" data-fmt="pdf"
                 title="PDF indir"><i class="fas fa-file-pdf"></i><span>PDF</span></button>
     </div>
   JS: ip-tbl-exp.js delegated handler bağlar; ipower2-table-export.js global helper üzerinden export.
   Renk paleti proje standardı: CSV=mavi, Excel=yeşil, PDF=kırmızı.
   ═════════════════════════════════════════════════════════════════════ */

.ip-tbl-exp-group {
    display: inline-flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}

.ip-tbl-exp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    background: #fff;
    color: #fff;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, filter 0.14s ease;
    white-space: nowrap;
    text-decoration: none;
}
.ip-tbl-exp-btn i { font-size: 12px; }
.ip-tbl-exp-btn + .ip-tbl-exp-btn { border-left: 1px solid rgba(255,255,255,0.32); }

.ip-tbl-exp-group .ip-tbl-exp-btn:first-child { border-radius: 8px 0 0 8px; }
.ip-tbl-exp-group .ip-tbl-exp-btn:last-child  { border-radius: 0 8px 8px 0; }
.ip-tbl-exp-group .ip-tbl-exp-btn:only-child  { border-radius: 8px; }

.ip-tbl-exp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    filter: brightness(1.06);
}
.ip-tbl-exp-btn:focus-visible {
    outline: 2px solid rgba(15, 23, 42, 0.4);
    outline-offset: 2px;
    z-index: 1;
}

/* CSV — mavi */
.ip-tbl-exp-btn--csv {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
}
.ip-tbl-exp-btn--csv:hover { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); }

/* Excel — yeşil */
.ip-tbl-exp-btn--xls {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-color: #059669;
}
.ip-tbl-exp-btn--xls:hover { background: linear-gradient(180deg, #059669 0%, #047857 100%); }

/* PDF — kırmızı */
.ip-tbl-exp-btn--pdf {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
}
.ip-tbl-exp-btn--pdf:hover { background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%); }

/* Disabled state (grid API henüz yok / veri boş) */
.ip-tbl-exp-btn[disabled],
.ip-tbl-exp-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.35);
    box-shadow: none;
}

/* Mobil — buton kompakt, "CSV/Excel/PDF" yazısı gizli, sadece ikon (label title'a düşer) */
@media (max-width: 640px) {
    .ip-tbl-exp-btn {
        padding: 6px 10px;
    }
    .ip-tbl-exp-btn span { display: none; }
    .ip-tbl-exp-btn i { font-size: 14px; }
    .ip-tbl-exp-btn + .ip-tbl-exp-btn { border-left-width: 1px; }
}
