/**
 * Elementor Broker Accounts Widget Styles
 * استایل ویجت حساب‌های بروکر - طبق UI تب‌دار 4 ستونی
 */

.broker-accounts-widget {
    width: 100%;
    direction: rtl;
    text-align: right;
    background-color: #f2f4f8;
    padding: 14px;
    font-family: 'IRANSans', 'Tahoma', sans-serif;
}

/* Tabs */
.broker-accounts-tabs {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 14px;
}

.broker-tab-link {
    border: 0;
    cursor: pointer;
    outline: 0;
    white-space: nowrap;
    border-radius: 8px;
    padding: 10px 14px;
    background-color: transparent;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.broker-tab-link:hover {
    background-color: rgba(232, 234, 246, 0.6);
}

.broker-tab-link.active {
    background-color: #e8eaf6;
    color: #111827;
    font-weight: 700;
}

.broker-tab-link:focus-visible {
    outline: 2px solid #e8eaf6;
    outline-offset: 2px;
}

/* Panels */
.broker-tab-content {
    display: none;
}

.broker-tab-content.active {
    display: block;
}

/* Cards Grid */
.accounts-grid {
    display: grid;
    gap: 14px;
}

.accounts-grid-1 {
    grid-template-columns: 1fr;
}

.accounts-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounts-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounts-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Card */
.account-card {
    background-color: #f6f7f9;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    padding: 14px 16px;
    min-width: 0;
}

/* Item rows */
.account-detail-item {
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
}

.account-detail-item:first-child {
    padding-top: 0;
}

.account-detail-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-title {
    position: relative;
    padding-right: 11px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
}

.detail-title::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #111827;
}

.detail-value {
    margin-top: 3px;
    padding-right: 11px;
    color: #757575;
    font-size: 12px;
    line-height: 1.9;
}

/* Responsive */
@media (max-width: 1024px) {
    .accounts-grid-4,
    .accounts-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .broker-accounts-widget {
        padding: 12px;
    }

    .broker-accounts-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .broker-accounts-tabs::-webkit-scrollbar {
        display: none;
    }

    .broker-tab-link {
        min-width: auto;
        padding: 9px 12px;
        font-size: 13px;
    }

    .accounts-grid-4,
    .accounts-grid-3,
    .accounts-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounts-grid {
        column-gap: 6px;
        row-gap: 10px;
    }

    .account-card {
        padding: 12px;
    }

    .account-detail-item {
        padding: 11px 0;
    }
}
