/**
 * SolClaim Custom Modal & Toast Notification System
 * Compliance: No native browser alert/confirm allowed.
 */

/* Modal Backdrop */
.sc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 5, 8, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.sc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.sc-modal {
    position: relative;
    background: #0f131c;
    border: 1px solid #232b3d;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(20, 241, 149, 0.05);
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-modal.sc-modal-wide {
    max-width: 720px;
}

.sc-modal-overlay.active .sc-modal {
    transform: translateY(0) scale(1);
}

.sc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 58px 20px 24px;
    border-bottom: 1px solid #1c2333;
}

.sc-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    margin: 0;
}

.sc-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #182030;
    border: 1px solid #2a344a;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.sc-modal-close:hover {
    background: #232d42;
    color: #ffffff;
    border-color: #3b4763;
}

.sc-modal-body {
    padding: 24px;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
}

.sc-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid #1c2333;
    background: #0a0d14;
}

.sc-modal-footer:empty {
    display: none !important;
}

/* Modal Buttons */
.sc-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    line-height: 1.2;
    user-select: none;
}

.sc-btn-secondary {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.sc-btn-secondary:hover {
    background: linear-gradient(135deg, rgba(45, 58, 82, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.sc-btn-secondary:active {
    transform: translateY(1px);
}

.sc-btn-primary {
    background: linear-gradient(135deg, #00F0FF 0%, #7928CA 50%, #D900FF 100%);
    color: #ffffff;
    font-weight: 800;
    border: 1px solid rgba(0, 240, 255, 0.4);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 8px 24px -2px rgba(0, 240, 255, 0.4),
        0 4px 14px rgba(217, 0, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.sc-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 #ffffff,
        0 12px 32px rgba(0, 240, 255, 0.6),
        0 6px 20px rgba(217, 0, 255, 0.45);
    border-color: rgba(0, 240, 255, 0.8);
}

.sc-btn-primary:active {
    transform: translateY(1px);
}

.sc-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 8px 24px -2px rgba(220, 38, 38, 0.4);
}

.sc-btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.55);
}

.sc-btn-danger:active {
    transform: translateY(1px);
}

/* Toast System */
.sc-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    pointer-events: none;
}

.sc-toast {
    pointer-events: auto;
    background: #0f1420;
    border: 1px solid #252e42;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: scToastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
}

.sc-toast.hiding {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
}

.sc-toast.success {
    border-left: 4px solid #14F195;
}

.sc-toast.error {
    border-left: 4px solid #ef4444;
}

.sc-toast.info {
    border-left: 4px solid #9945FF;
}

.sc-toast-content {
    flex: 1;
}

.sc-toast-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.sc-toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sc-toast-close:hover {
    color: #cbd5e1;
}

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

/* Custom Scrollbar for Modal */
.sc-modal-body::-webkit-scrollbar {
    width: 6px;
}

.sc-modal-body::-webkit-scrollbar-track {
    background: #0d1017;
}

.sc-modal-body::-webkit-scrollbar-thumb {
    background: #252e42;
    border-radius: 3px;
}

.sc-modal-body::-webkit-scrollbar-thumb:hover {
    background: #364460;
}

/* Legal Document Popups */
.sc-legal-doc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #94a3b8;
}

.sc-legal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #1c2333;
    font-size: 0.8rem;
    color: #64748b;
}

.sc-legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sc-legal-badge.emerald {
    background: rgba(20, 241, 149, 0.12);
    color: #14F195;
    border: 1px solid rgba(20, 241, 149, 0.25);
}

.sc-legal-badge.blue {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.sc-legal-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.sc-legal-callout {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.sc-legal-callout.danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.sc-legal-callout.emerald {
    background: rgba(20, 241, 149, 0.08);
    border: 1px solid rgba(20, 241, 149, 0.25);
    color: #6ee7b7;
}

.sc-legal-callout.blue {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #bae6fd;
}

.sc-legal-section {
    margin-bottom: 22px;
}

.sc-legal-section:last-child {
    margin-bottom: 0;
}

.sc-legal-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-legal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #182030;
    color: #14F195;
    font-size: 0.78rem;
    font-weight: 700;
}

.sc-legal-p {
    margin: 0 0 10px 0;
    color: #94a3b8;
}

.sc-legal-list {
    margin: 6px 0 12px 18px;
    padding: 0;
    color: #94a3b8;
}

.sc-legal-list li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.sc-legal-list strong,
.sc-legal-p strong {
    color: #e2e8f0;
    font-weight: 600;
}

/* Multi-Chain Wallet Selection Modal */
.sc-wallet-modal-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Category Filter Tabs */
.sc-wallet-tabs {
    display: flex;
    gap: 6px;
    background: rgba(14, 19, 29, 0.8);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
}

.sc-wallet-tabs::-webkit-scrollbar {
    display: none;
}

.sc-wallet-tab-btn {
    flex: 1;
    min-width: max-content;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #8fa0b5;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    white-space: nowrap;
}

.sc-wallet-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.sc-wallet-tab-btn.active {
    background: #1b2438;
    color: #14F195;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Group Sections */
.sc-wallet-group-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-wallet-group-section.hidden {
    display: none !important;
}

.sc-wallet-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 2px 2px 2px;
}

.sc-wallet-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.sc-wallet-group-count {
    color: #475569;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Responsive Grid for Wallets */
.sc-wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .sc-wallet-grid {
        grid-template-columns: 1fr;
    }
}

/* Minimalist Clean Wallet Card (NO ICONS, NO BADGES) */
.sc-wallet-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 13px 15px;
    background: rgba(18, 25, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    box-sizing: border-box;
    width: 100%;
}

.sc-wallet-card:hover {
    background: rgba(25, 36, 58, 0.95);
    border-color: rgba(20, 241, 149, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sc-wallet-card:active {
    transform: translateY(0);
}

.sc-wallet-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.sc-wallet-card-name {
    font-size: 0.96rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.sc-wallet-card-status {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sc-wallet-card.installed .sc-wallet-card-status {
    color: #14F195;
}

.sc-wallet-card-sub {
    font-size: 0.77rem;
    color: #8da2bb;
    line-height: 1.35;
}

.sc-wallet-footer-hint {
    font-size: 0.74rem;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}


