/* ===========================
   footer.css — Extracted from footer.php
   All inline <style> blocks consolidated here
   =========================== */

/* === Toast Notifications === */
.Toastify {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.Toastify__toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    overflow: hidden;
    position: relative;
}

.Toastify__toast--success {
    background: #2fad30;
}

.Toastify__toast--error {
    background: #e74c3c;
}

.Toastify__toast--info {
    background: #3498db;
}

.Toastify__toast--warning {
    background: #f1c40f;
}

.Toastify__toast--animate-in {
    animation: toastSlideIn 0.3s ease forwards;
}

.Toastify__toast--animate-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.Toastify__toast-body {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.Toastify__toast-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.Toastify__toast-text {
    flex: 1;
}

.Toastify__close-button {
    background: transparent;
    border: none;
    color: #fff;
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

.Toastify__close-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.Toastify__close-button:hover {
    opacity: 1;
}

.Toastify__progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* === Form validation === */
.form-control.is-invalid {
    border-color: #dc3545 !important;
}

.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

.form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #e53935 !important;
}

.MuiInputBase-input:focus {
    outline: none !important;
}


/* === Binance button spinner === */
@keyframes binance-spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Smooth Transitions === */
.modal.fade {
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.modal.fade.show {
    opacity: 1;
}

.modal.fade .modal-dialog {
    transform: translateY(25px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.modal.fade.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-backdrop.fade {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, backdrop-filter;
}

.modal-backdrop.fade.show {
    opacity: 0.4;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ===== Custom select (.csel) — used in footer modals; must live here because
   many pages (e.g. disputes.php) load footer.css without trader-dashboard.css ===== */
.csel {
    position: relative;
    width: 100%;
}
.csel-trigger {
    width: 100%;
    padding: 10px 14px;
    padding-right: 36px;
    background: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: border 0.25s, box-shadow 0.25s;
    display: flex;
    align-items: center;
    user-select: none;
    position: relative;
    min-height: 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csel-trigger:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.csel.open .csel-trigger {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
    border-radius: 10px 10px 0 0;
}
.csel-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.25s;
    color: #666;
    display: flex;
}
.csel.open .csel-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #e53935;
}
.csel-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #12141c;
    border: 1px solid rgba(229, 57, 53, 0.3);
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 999;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.2s;
    pointer-events: none;
}
.csel.open .csel-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
.csel-option {
    padding: 10px 14px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csel-option:hover {
    background: #e53935;
    color: #fff;
}
.csel-option.selected {
    background: rgba(25, 118, 210, 0.15);
    color: #e53935;
    font-weight: 600;
}
.csel-option.selected:hover {
    background: #e53935;
    color: #fff;
}
.csel-dropdown::-webkit-scrollbar {
    width: 5px;
}
.csel-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.csel-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Custom Dropdown Animation */
#noentry-reason-dropdown {
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

#noentry-reason-dropdown-container.open #noentry-reason-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: all !important;
    z-index: 99999 !important;
    background: #1a1d26 !important;
    display: block !important;
}

/* Ensure specific modals don't clip dropdowns */
#noEntryModal .admin-modal,
#noEntryModal .admin-modal-body,
#addCardModal .admin-modal,
#addCardModal .admin-modal-body,
#editCardModal .admin-modal,
#editCardModal .admin-modal-body,
#addLinkModal .admin-modal,
#addLinkModal .admin-modal-body,
#addIbanModal .admin-modal,
#addIbanModal .admin-modal-body,
.admin-form-group {
    overflow: visible !important;
}

.premium-select-dropdown {
    z-index: 9999 !important;
}

/* Modal Responsive Improvements */
@media (max-width: 768px) {
    .admin-modal {
        max-height: 85vh !important;
        margin: 10px;
        margin-bottom: 80px;
        /* Space for bottom nav */
    }

    .admin-modal-footer {
        padding: 16px !important;
    }

    .admin-modal-footer .d-flex {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .admin-modal-footer .admin-btn {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* === Prevent body scroll when modal is open === */
body.modal-open {
    overflow: hidden !important;
}

/* === Failed Payments Modal === */
.wide-modal {
    max-width: 1000px !important;
    width: 95% !important;
}

.failed-payments-modal-body {
    padding-bottom: 24px !important;
}

.failed-payments-modal-body .admin-table-wrap {
    padding: 0 24px;
    overflow-x: auto;
}

.failed-payments-modal-body .admin-table {
    border-spacing: 0 8px;
    /* More spacing between rows like in screenshot */
}

.failed-payments-modal-body .admin-table tbody td {
    background: rgba(255, 255, 255, 0.03);
    border: none;
    padding: 20px;
}

.failed-payments-modal-body .admin-table thead th {
    border: none;
    background: transparent;
    color: #4b5563;
    font-size: 10px;
    padding: 12px 20px;
}

.failed-payments-modal-body .admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* === Card Copying Component === */
.card-copy-box {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    width: fit-content;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-copy-box:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.card-copy-box .card-icon {
    font-size: 16px;
    margin-right: 8px;
    color: #94a3b8;
}

.card-copy-box .card-number-text {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .wide-modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .failed-payments-modal-body .admin-table-wrap {
        padding: 0 10px;
        -webkit-overflow-scrolling: touch;
    }

    .failed-payments-modal-body .admin-table tbody td {
        padding: 12px 8px;
        font-size: 11px;
    }

    .failed-payments-modal-body .admin-table thead th {
        padding: 8px;
        font-size: 9px;
    }

    #failedPaymentsModal .admin-modal-header {
        padding: 16px 20px !important;
    }

    #failedPaymentsModal .admin-modal-title {
        font-size: 16px !important;
    }

    #failed-payments-card-number {
        font-size: 12px !important;
    }
}
/* Fixed Drawer Modal Scrolling (especially for 627px height screen) */
.modal.fade .modal-dialog.right-popup .admin-modal {
    max-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 0 !important;
    background: #1a1d26 !important;
}

.modal.fade .modal-dialog.right-popup .admin-modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 200px;
    padding-bottom: 40px !important;
    scrollbar-width: thin;
}

@media (max-width: 768px) {
    .modal.fade .modal-dialog.right-popup .admin-modal-body {
        padding-bottom: 110px !important; /* Proper spacing for mobile bottom menus on small screens like 627px */
    }
}

.modal.fade .modal-dialog.right-popup .admin-modal-footer {
    position: sticky !important;
    bottom: 0;
    z-index: 100;
    margin-top: auto;
    background: #1a1d26 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Ensure right-side positioning */
.modal-dialog.right-popup {
    margin-right: 0 !important;
    margin-left: auto !important;
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
}
