/* ========================================
   DASHBOARD STYLES
   Стили главной страницы кабинета
   ======================================== */

/* === MAIN CONTAINER === */

.dashboard {
    display: block;
    margin: 32px 0;
}

.dashboard .container {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: stretch;
}

.dashboard-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 880px;
}

.dashboard-right {
    width: 464px;
    flex-shrink: 0;
    display: flex;
}

/* === DASHBOARD HEADER === */

.dashboard-header {
    border-radius: 24px;
    padding: 16px 20px !important;
    background: rgba(15, 21, 26, 0.8);
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px !important;
}

.dashboard-actions-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* === DASHBOARD BUTTONS === */

.btn-dashboard-glass {
    position: relative;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    height: 48px;
    border-radius: 100px;
    padding: 12px 20px 12px 44px !important;
    background-color: rgba(41, 96, 135, 0.4) !important;
    color: white;
    border: none;
    border-top: solid 1px rgba(255, 255, 255, 0.1);
    border-bottom: solid 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    box-sizing: border-box;
}

/* Icon via pseudo-element to avoid background conflicts */
.btn-dashboard-glass::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.btn-dashboard-glass:hover {
    background-color: rgba(41, 96, 135, 0.55);
    border-top-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Button icons */
.btn-dashboard-exchange::before {
    background-image: url("../images/exchange.svg");
}

.btn-dashboard-exchange:hover {
    background-color: rgba(41, 96, 135, 0.55) !important;
}

/* Coming Soon buttons */
.btn-dashboard-remit,
.btn-dashboard-template {
    position: relative;
    opacity: 0.5;
    pointer-events: auto; /* Изменяем чтобы работал hover */
    cursor: not-allowed;
    background-color: rgba(90, 90, 103, 0.2) !important;
    background-repeat: no-repeat !important;
    background-position: 14px center !important;
    background-size: 20px 20px !important;
}

/* Disable ::before pseudo-element for coming soon buttons */
.btn-dashboard-remit::before,
.btn-dashboard-template::before {
    display: none;
}

.btn-dashboard-remit {
    background-image: url("../images/remit.svg") !important;
}

.btn-dashboard-template {
    background-image: url("../images/template.svg") !important;
}

.btn-dashboard-remit::after,
.btn-dashboard-template::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: url("../images/clock.png") center / contain no-repeat;
    z-index: 10;
    pointer-events: none;
}

/* Coming Soon Tooltip (наследует базовые стили из popups.css) */
.btn-dashboard-remit .coming-soon-tooltip,
.btn-dashboard-template .coming-soon-tooltip {
    /* Размеры и позиционирование (уникальные) */
    top: -45px;
    left: 100%;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 16px;
    
    /* Текст (уникальные) */
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
}

.btn-dashboard-remit:hover .coming-soon-tooltip,
.btn-dashboard-template:hover .coming-soon-tooltip {
    opacity: 1;
    visibility: visible;
}

/* === TRANSACTIONS BLOCK === */

.dashboard-transactions {
    border-radius: 24px;
    padding: 16px 20px;
    background: rgba(15, 21, 26, 0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transactions-header h3 {
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
    color: white;
    margin: 0;
}

/* Show all link */
.show-all-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    display: inline-block;
    padding: 12px 20px;
    border-radius: 100px;
    background: rgba(41, 96, 135, 0.4);
    color: white;
    text-decoration: none;
    border-top: solid 1px rgba(255, 255, 255, 0.1);
    border-bottom: solid 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.show-all-link:hover {
    background: rgba(41, 96, 135, 0.55);
    border-top-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* === RESPONSIVE === */

@media (max-width: 1200px) {
    .dashboard .container {
        flex-direction: column;
    }
    
    .dashboard-left {
        max-width: 100%;
    }
    
    .dashboard-right {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .dashboard {
        margin: 24px 0;
    }
    
    .dashboard .container {
        gap: 24px;
    }
    
    .dashboard-left {
        gap: 24px;
    }
    
    /* Dashboard header - КНОПКИ ОСТАЮТСЯ В ЛИНИЮ */
    .dashboard-header {
        padding: 14px 18px !important;
        /* НЕ меняем flex-direction, оставляем row */
    }
    
    .dashboard-actions-left {
        /* НЕ меняем flex-direction, оставляем row */
        gap: 10px;
        flex-wrap: wrap; /* Позволяем переносить на новую строку если не помещаются */
    }
    
    .btn-dashboard-glass {
        font-size: 15px;
        height: 46px;
        padding: 12px 18px 12px 42px !important;
        flex: 1; /* Равномерно распределяем ширину */
        min-width: 0; /* Позволяем сжиматься */
    }
    
    .btn-dashboard-glass::before {
        left: 12px;
        width: 18px;
        height: 18px;
    }
    
    .btn-dashboard-remit,
    .btn-dashboard-template {
        background-position: 12px center !important;
        background-size: 18px 18px !important;
    }
    
    /* Transactions block */
    .dashboard-transactions {
        padding: 14px 18px;
    }
    
    .transactions-header h3 {
        font-size: 22px;
        line-height: 30px;
    }
    
    .show-all-link {
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (max-width: 520px) {
    .dashboard {
        margin: 20px 0;
    }
    
    .dashboard .container {
        gap: 20px;
    }
    
    .dashboard-left {
        gap: 20px;
    }
    
    /* Dashboard header - КНОПКИ ОСТАЮТСЯ В ЛИНИЮ */
    .dashboard-header {
        padding: 12px 16px !important;
        border-radius: 20px;
    }
    
    .dashboard-actions-left {
        gap: 8px;
        /* Остаются в линию с flex-wrap */
    }
    
    .btn-dashboard-glass {
        font-size: 14px;
        height: 44px;
        padding: 10px 16px 10px 38px !important;
        flex: 1;
        min-width: 0;
    }
    
    .btn-dashboard-glass::before {
        left: 10px;
        width: 16px;
        height: 16px;
    }
    
    .btn-dashboard-remit,
    .btn-dashboard-template {
        background-position: 10px center !important;
        background-size: 16px 16px !important;
    }
    
    .btn-dashboard-remit::after,
    .btn-dashboard-template::after {
        width: 14px;
        height: 14px;
        top: -3px;
        right: -3px;
    }
    
    /* Coming Soon Tooltip */
    .btn-dashboard-remit .coming-soon-tooltip,
    .btn-dashboard-template .coming-soon-tooltip {
        top: auto;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        padding: 6px 12px;
        border-radius: 12px;
    }
    
    /* Transactions block */
    .dashboard-transactions {
        padding: 12px 16px;
        border-radius: 20px;
    }
    
    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .transactions-header h3 {
        font-size: 20px;
        line-height: 28px;
    }
    
    .show-all-link {
        font-size: 13px;
        padding: 8px 14px;
        width: 100%;
        text-align: center;
    }
}