/* ABP Pallet & M2 Calculator — Frontend CSS
   StayCreative by Baris D. | www.staycreative.be */

/* ── Stok badge ─────────────────────────────────────────────────────────── */
.abpp-stock-badge {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: .82em;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}
.abpp-badge-ok   { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.abpp-badge-warn { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.abpp-badge-out  { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* ── Sekmeler ────────────────────────────────────────────────────────────── */
.abpp-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 0;
}
.abpp-tab {
    flex: 1;
    padding: 9px 5px;
    font-size: .84em;
    font-weight: 600;
    border: 2px solid #c9d5e0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #f2f5f8;
    color: #555;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1.3;
}
.abpp-tab:hover { background: #dce8f2; color: #1e3a5f; }
.abpp-tab--active { background: #1e3a5f !important; color: #fff !important; border-color: #1e3a5f !important; }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.abpp-panel {
    padding: 14px 16px;
    border: 2px solid #1e3a5f;
    border-radius: 0 0 6px 6px;
    background: #fff;
}

.abpp-label {
    display: block;
    font-weight: 600;
    font-size: .9em;
    color: #222;
    margin-bottom: 8px;
}
.abpp-hint {
    display: inline-block;
    font-weight: 400;
    font-size: .82em;
    color: #999;
    margin-left: 6px;
}
.abpp-input {
    width: 100%;
    padding: 10px 13px;
    font-size: 1.05em;
    border: 2px solid #c9d5e0;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color .15s;
    -moz-appearance: textfield;
}
.abpp-input::-webkit-outer-spin-button,
.abpp-input::-webkit-inner-spin-button { -webkit-appearance: auto; }
.abpp-input:focus { border-color: #1e3a5f; outline: none; box-shadow: 0 0 0 3px rgba(30,58,95,.1); }

/* ── Sonuç kutusu ────────────────────────────────────────────────────────── */
.abpp-result {
    margin-top: 10px;
    background: #f0f6ff;
    border: 1px solid #c0d4ea;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: .9em;
}
.abpp-res-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #d8e8f5;
}
.abpp-res-row:last-of-type { border-bottom: none; }
.abpp-res-row span  { color: #555; }
.abpp-res-row strong { color: #1e3a5f; }
.abpp-res-price strong { font-size: 1.15em; color: #c0392b; }

/* ── Stok mesajı ─────────────────────────────────────────────────────────── */
.abpp-msg { margin: 8px 0 0; font-size: .85em; font-weight: 600; padding: 6px 10px; border-radius: 4px; }
.abpp-msg--ok  { background: #e8f5e9; color: #2e7d32; }
.abpp-msg--err { background: #ffebee; color: #b71c1c; }

/* ── Birim fiyat ─────────────────────────────────────────────────────────── */
.abpp-unit-price { font-weight: 700; font-size: 1.1em; }
.abpp-pkg-price  { color: #888; font-size: .85em; }

/* ── Palet bilgi kutusu ──────────────────────────────────────────────────── */
.abpp-pal-info {
    margin-top: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #dde3ea;
    border-left: 3px solid #2e6da4;
    border-radius: 5px;
    font-size: .85em;
}
.abpp-pal-info h5 { margin: 0 0 8px; font-size: .95em; color: #1e3a5f; }
.abpp-pal-info table { width: 100%; border-collapse: collapse; }
.abpp-pal-info td { padding: 3px 0; border-bottom: 1px solid #eee; }
.abpp-pal-info td:first-child { color: #888; width: 38%; }
.abpp-pal-info tr:last-child td { border-bottom: none; }

/* ── Mobil ───────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .abpp-tab   { font-size: .75em; padding: 7px 3px; }
    .abpp-hint  { display: block; margin-left: 0; margin-top: 3px; }
}

/* İndirim satırı */
.abpp-res-discount strong { color: #2e7d32 !important; }
