/* css/wallet-connect.css - Полностью масштабируемое модальное окно */

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

/* ============================================
   MODAL - Полностью на CSS переменных
   ============================================ */
.modal {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--modal-border-radius);
    width: var(--modal-width);
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 calc(var(--modal-shadow-blur) * 0.5) var(--modal-shadow-blur) rgba(0, 0, 0, 0.5);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

/* ============================================
   HEADER
   ============================================ */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--modal-padding) * 0.75) var(--modal-padding);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: var(--modal-header-height);
}

.modal-header h3 {
    font-size: var(--modal-title-size);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: calc(var(--modal-title-letter-spacing) * 1px);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--modal-title-size);
    cursor: pointer;
    width: calc(var(--modal-button-height) * 0.9);
    height: calc(var(--modal-button-height) * 0.9);
    padding: 0;
    border-radius: calc(var(--modal-border-radius) * 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ============================================
   CONTENT
   ============================================ */
.modal-content {
    padding: var(--modal-padding);
}

.modal-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: calc(var(--modal-gap) * 2);
    text-align: center;
    line-height: 1.6;
    font-size: var(--modal-description-size);
}

/* ============================================
   WALLET OPTIONS
   ============================================ */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: var(--modal-gap);
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: var(--modal-gap);
    padding: calc(var(--modal-padding) * 0.625); /* 20px at base */
    background: rgba(255, 255, 255, 0.05);
    border: calc(var(--modal-border-radius) * 0.1) solid rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--modal-border-radius) * 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
    min-height: var(--wallet-option-height);
}

.wallet-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(247, 147, 26, 0.1), transparent);
    transition: left 0.5s;
}

.wallet-option:hover::before {
    left: 100%;
}

.wallet-option:hover {
    border-color: rgba(247, 147, 26, 0.5);
    background: rgba(247, 147, 26, 0.05);
    transform: translateY(calc(var(--modal-gap) * -0.125)); /* -2px at base */
    box-shadow: 0 calc(var(--modal-gap) * 0.5) calc(var(--modal-gap) * 1.5625) rgba(247, 147, 26, 0.15);
}

.wallet-option:active {
    transform: translateY(0);
}

/* ============================================
   WALLET ICON
   ============================================ */
.wallet-option-icon {
    width: var(--wallet-icon-size);
    height: var(--wallet-icon-size);
    border-radius: calc(var(--wallet-icon-size) * 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.wallet-icon {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* ============================================
   WALLET INFO
   ============================================ */
.wallet-option-info {
    flex: 1;
}

.wallet-option-name {
    font-size: var(--wallet-name-size);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: calc(var(--modal-gap) * 0.25);
}

.wallet-option-desc {
    font-size: var(--wallet-desc-size);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

/* ============================================
   WALLET STATUS
   ============================================ */
.wallet-status {
    width: var(--wallet-status-size);
    height: var(--wallet-status-size);
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    box-shadow: 0 0 0 calc(var(--wallet-status-size) * 0.25) rgba(16, 185, 129, 0.2);
    position: relative;
}

.wallet-status::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--wallet-status-size) * 0.5);
    height: calc(var(--wallet-status-size) * 0.5);
    background: #ffffff;
    border-radius: 50%;
}

.wallet-status.not-detected {
    background: #ef4444;
    box-shadow: 0 0 0 calc(var(--wallet-status-size) * 0.25) rgba(239, 68, 68, 0.2);
}

.wallet-status.connecting {
    background: #f59e0b;
    box-shadow: 0 0 0 calc(var(--wallet-status-size) * 0.25) rgba(245, 158, 11, 0.2);
    animation: blink 1s infinite;
}

/* ============================================
   FOOTER
   ============================================ */
.modal-footer {
    padding-top: calc(var(--modal-padding) * 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.security-note {
    display: flex;
    align-items: center;
    gap: calc(var(--modal-gap) * 0.5);
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: calc(var(--modal-padding) * 0.375) calc(var(--modal-padding) * 0.5);
    border-radius: calc(var(--modal-border-radius) * 0.6);
    font-size: calc(var(--modal-font-size) * 0.875);
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================
   SCROLLBAR
   ============================================ */
.modal::-webkit-scrollbar {
    width: calc(var(--modal-gap) * 0.25);
}

.modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: calc(var(--modal-gap) * 0.125);
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: calc(var(--modal-gap) * 0.125);
}

.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    max-width: calc(var(--modal-width) * 0.625);
}

.loading-spinner {
    width: calc(var(--modal-button-height) * 1.36);
    height: calc(var(--modal-button-height) * 1.36);
    border: calc(var(--modal-gap) * 0.25) solid rgba(255, 255, 255, 0.1);
    border-top: calc(var(--modal-gap) * 0.25) solid #f7931a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto calc(var(--modal-gap) * 1.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: calc(var(--modal-title-size) * 1);
    margin-bottom: calc(var(--modal-gap) * 0.5);
    color: #ffffff;
}

.loading-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: calc(var(--modal-font-size) * 0.875);
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   БЕЗ МЕДИА-ЗАПРОСОВ!
   Все масштабирование через ScalingSystem
   ============================================ */