/* ============================================================
   Gold Transfer — buton, modal ve içerik stilleri.
   market.css / profile.css'ten bağımsız çalışır.
   ============================================================ */

/* JS `el.hidden = true/false` ile açılıp kapanan tüm elemanlar için:
   sınıf kurallarındaki display:flex/grid, tarayıcının [hidden]{display:none}
   kuralını ezer; bu yüzden global olarak !important ile garanti altına alıyoruz. */
[hidden] {
    display: none !important;
}

/* ---- Transfer butonu (panelde) ---- */
.transfer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    margin-left: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #ffd700 100%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
    white-space: nowrap;
}

.transfer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(184, 134, 11, 0.45);
    filter: brightness(1.1);
}

.transfer-btn:active {
    transform: translateY(0);
}

.transfer-btn[data-email-unverified="1"] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.transfer-btn[data-email-unverified="1"]:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
    filter: grayscale(0.5);
}

.transfer-btn-icon {
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
}

/* ---- Modal genel ---- */
.transfer-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.transfer-modal.is-open {
    display: flex;
}

.transfer-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.transfer-modal-card {
    position: relative;
    width: min(440px, calc(100% - 32px));
    /* Yükseklik sınırlaması yok: kart, içeriği kadar büyür.
       (Uzayan tek bölüm alıcı listesidir; o kendi içinde kayar.) */
    background: linear-gradient(180deg, #1c1f26 0%, #13151a 100%);
    color: #e8e8e8;
    border: 1px solid rgba(218, 165, 32, 0.35);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: transfer-modal-in 0.18s ease-out;
}

@keyframes transfer-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.transfer-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(218, 165, 32, 0.08);
}

.transfer-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 0.3px;
}

.transfer-modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.15s ease;
}

.transfer-modal-close:hover {
    color: #fff;
}

.transfer-modal-body {
    padding: 20px;
    /* Gövde kaydırmaz; kart içerik kadar uzar. */
}

.transfer-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

/* ---- Bakiye şeridi ---- */
.transfer-current-balance {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.15), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(218, 165, 32, 0.25);
    border-radius: 8px;
}

.transfer-balance-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transfer-balance-value {
    font-size: 22px;
    font-weight: 700;
    color: #ffd700;
    font-variant-numeric: tabular-nums;
}

.transfer-balance-currency {
    font-size: 12px;
    color: #daa520;
    font-weight: 600;
}

/* ---- Form alanları ---- */
.transfer-field {
    display: block;
    margin-bottom: 16px;
}

.transfer-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 6px;
}

.transfer-recipient-select,
.transfer-amount-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: #0f1115;
    color: #f0f0f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.transfer-recipient-select:focus,
.transfer-amount-input:focus {
    border-color: #daa520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.18);
}

.transfer-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

/* ---- E-posta uyarısı ---- */
.transfer-email-warning {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    margin-top: 14px;
    background: rgba(220, 60, 60, 0.12);
    border: 1px solid rgba(220, 60, 60, 0.35);
    border-radius: 6px;
    color: #f8c4c4;
    font-size: 13px;
}

.transfer-email-warning i {
    color: #ff6b6b;
}

.transfer-email-btn {
    margin-left: auto;
    padding: 5px 12px;
    background: #ff6b6b;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.15s ease;
}

.transfer-email-btn:hover {
    background: #ff5252;
    color: #fff;
}

/* ---- Hata kutusu ---- */
.transfer-error-box {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(220, 60, 60, 0.12);
    border: 1px solid rgba(220, 60, 60, 0.35);
    border-radius: 6px;
    color: #f8c4c4;
    font-size: 13px;
}

/* ---- Onay adımı ---- */
.transfer-confirm-summary {
    text-align: center;
    padding: 12px 8px 20px;
}

.transfer-confirm-line {
    margin: 0 0 12px;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.transfer-confirm-line strong {
    color: #ffd700;
}

.transfer-confirm-line i {
    color: #daa520;
}

.transfer-confirm-detail {
    margin: 0;
    font-size: 13px;
    color: #aaa;
}

/* ---- Butonlar ---- */
.transfer-btn-secondary,
.transfer-btn-primary {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    border: none;
}

.transfer-btn-secondary {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.transfer-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.transfer-btn-primary {
    background: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #ffd700 100%);
    color: #1c1f26;
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.35);
}

.transfer-btn-primary:hover {
    filter: brightness(1.1);
}

.transfer-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}

/* ---- Para birimi sekmeleri (ASE / ASA) ---- */
.transfer-currency-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.transfer-cur-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 8px;
    background: #0f1115;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.transfer-cur-tab:hover {
    border-color: rgba(218, 165, 32, 0.45);
}

.transfer-cur-tab.active {
    border-color: #daa520;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.18), rgba(255, 215, 0, 0.06));
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15);
}

.cur-tab-name {
    font-size: 13px;
    font-weight: 700;
}

.cur-tab-name.ase { color: #a5d6a7; }
.cur-tab-name.asa { color: #90caf9; }

.cur-tab-balance {
    font-size: 12px;
    color: #ffd700;
    font-variant-numeric: tabular-nums;
}

/* ---- Alıcı seçici (avatarlı dropdown) ---- */
.transfer-recipient-picker {
    position: relative;
}

.transfer-recipient-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #0f1115;
    color: #f0f0f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.transfer-recipient-toggle:hover,
.transfer-recipient-toggle[aria-expanded="true"] {
    border-color: #daa520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.18);
}

.recipient-toggle-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.recipient-toggle-text {
    flex: 1;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-toggle-text.is-selected {
    color: #f0f0f0;
    font-weight: 600;
}

.recipient-toggle-caret {
    color: #888;
    font-size: 12px;
}

.transfer-recipient-panel {
    /* Normal akışta: açıldığında modal kartı aşağı doğru büyütür,
       absolute konumlandırma + overflow:hidden kırpması yok. */
    position: static;
    margin-top: 4px;
    background: #14161c;
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.recipient-search-wrap {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recipient-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    background: #0f1115;
    color: #f0f0f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.recipient-search-input:focus {
    border-color: #daa520;
}

.recipient-list {
    max-height: 220px;
    overflow-y: auto;
}

.recipient-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.recipient-item:hover {
    background: rgba(218, 165, 32, 0.1);
}

.recipient-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.recipient-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.recipient-name {
    font-size: 13px;
    font-weight: 600;
    color: #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-steamid {
    font-size: 11px;
    color: #888;
}

.recipient-profile-link {
    color: #90caf9;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 4px;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.12s ease, color 0.12s ease;
}

.recipient-profile-link:hover {
    background: rgba(144, 202, 249, 0.15);
    color: #fff;
}

.recipient-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* ---- Onay adımı: alıcı kartı ---- */
.transfer-confirm-recipient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(218, 165, 32, 0.08);
    border: 1px solid rgba(218, 165, 32, 0.25);
    border-radius: 10px;
}

.transfer-confirm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(218, 165, 32, 0.5);
}

.transfer-confirm-recipient-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.transfer-confirm-recipient-info strong {
    color: #fff;
    font-size: 15px;
}

.transfer-profile-link {
    font-size: 12px;
    color: #90caf9;
    text-decoration: none;
}

.transfer-profile-link:hover {
    text-decoration: underline;
    color: #fff;
}

/* Mobil */
@media (max-width: 480px) {
    .transfer-modal-card {
        width: calc(100% - 16px);
    }
    .transfer-btn {
        font-size: 12px;
        padding: 5px 10px;
        margin-left: 6px;
    }
    .recipient-list {
        max-height: 180px;
    }
}
