/**
 * Broker Comparison Styles
 */

/* General Layout */
.broker-comparison-container {
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(to bottom right, #ffffff, rgba(255, 242, 154, 0.2));
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.broker-sidebar {
    width: 240px;
    background-color: #ffffff;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.broker-main-content {
    flex: 1;
    padding: 1rem;
}

/* Typography */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    font-size: 0.875rem;
    color: #747474;
}

.sidebar-brokers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-broker-card {
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    padding: 0.75rem;
    position: relative;
    cursor: pointer;
}

.sidebar-broker-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.broker-number {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #000000;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    z-index: 2;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Broker Logo Styles - Improved */
.broker-logo {
    width: 120px;
    height: 120px;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.broker-logo:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Text logo style */
.broker-logo span {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.875rem;
    text-align: center;
    padding: 10px;
    line-height: 1.2;
}

/* Image logo style */
.broker-logo-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

.broker-logo:hover .broker-logo-image {
    transform: scale(1.05);
}

/* Logo container styles */
.broker-logo-container {
    width: 100%;

    position: relative;
    margin: 1.5rem auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Number indicator styles - Improved positioning */
.broker-number-large {
    margin-top: 12px !important;
    position: absolute;
    top: -12px;
    left: -12px;
    background-color: #000000;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffffff;
    z-index: 2;
}

/* Sidebar broker logo styles */
.broker-logo-small {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.broker-logo-small span {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding: 5px;
    text-align: center;
}

.broker-logo-small-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

.broker-sidebar-details {
    font-size: 0.75rem;
}

.broker-rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.broker-rating-row span:first-child {
    font-weight: 500;
}

.rating-value {
    display: flex;
    align-items: center;
}

.rating-value span {
    font-weight: 700;
    margin-right: 0.25rem;
}

.broker-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.broker-detail-row span:first-child {
    color: #747474;
    min-width: 90px; /* Fixed width for labels */
}

.broker-detail-row span:last-child {
    font-weight: 500;
    text-align: right;
}

/* Improved Broker Listing Content Styles */
.broker-listing-content {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 0 auto 2.5rem auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.broker-listing-content:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
    .broker-listing-content {
        flex-direction: row;
        padding: 2rem;
    }
}

/* Broker Logo Ratings Container */
.broker-logo-ratings {

    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}



/* Broker Ratings */
.broker-ratings {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.trustpilot-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.trustpilot-rating img {
    margin-right: 0.5rem;
}

.trustpilot-rating span {
    font-size: 0.75rem;
    color: #747474;
}

.review-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-label span:first-child {
    color: #747474;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.review-value {
    font-weight: 500;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.star-rating {
    display: flex;
    margin-bottom: 1.5rem;
}

.pip-penguin-score {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pip-penguin-logo {
    background-color: #000000;
    border-radius: 0.25rem;
    padding: 0.25rem;
    margin-right: 0.75rem;
}

.pip-score {
    font-size: 2rem;
    font-weight: 700;
}

/* Improved Buttons */
.review-button {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: #333;
    display: inline-block;
    text-align: center;
}

.review-button:hover {
    background-color: #f9f9f9;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.visit-button {
    font-size: 16px;
    background-color: #5f7ef1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
animation: none !important;
    padding: 1rem 2rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: block;
    border: none;
 }



.visit-button:hover {
    background-color: #2c68d6;
    transform: translateY(-2px);
 }

/* Improved Broker Details Styles */
.broker-details {
    width: auto !important;
    flex: 1;
    background-color: inherit;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.broker-details h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.broker-details-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Improved broker-detail-item with fixed width labels */
.broker-detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.broker-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.broker-detail-item span:first-child {
    color: #747474;
    font-size: 1rem;
    min-width: 140px; /* Fixed width for labels */
    padding-right: 1.5rem; /* Add padding between spans */
}

.broker-detail-item span:last-child {
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
    text-align: right;
    flex: 1;
}

/* Widget Styles */
.widget-broker-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.widget-broker-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.widget-broker-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.widget-broker-logo {
    width: 50px;
    height: 50px;
    border-radius: 0.375rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.widget-broker-logo span {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
}

.widget-broker-logo-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
}

.widget-broker-info {
    flex: 1;
}

.widget-broker-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.widget-broker-info p {
    font-size: 0.75rem;
    color: #747474;
    margin: 0 0 0.5rem 0;
}

.widget-broker-button {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: #3676ea;
    color: #ffffff;
    text-decoration: none;
    border-radius: 9999px;
}

.widget-broker-button:hover {
    background-color: #2c68d6;
}


/* Container Dimensions Admin Styles */
.container-dimensions {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    margin-bottom: 20px;
}

.container-dimensions h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}


/**
 * تغییرات مربوط به broker-detail-item
 */

/* استایل کلی برای لیست جزئیات */
.broker-details-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* استایل جدید برای هر آیتم جزئیات */
.broker-detail-item {
    display: flex;
    flex-direction: row;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: flex-start;
    width: 100%;
}

.broker-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* استایل برای برچسب (عنوان) */
.broker-detail-item span:first-child {
    color: #747474;
    font-size: 1rem;
    width: 140px; /* عرض ثابت برای برچسب‌ها */
    min-width: 140px;
    padding-right: 1.5rem;
    text-align: left;
    display: block;
}

/* استایل برای مقدار */
.broker-detail-item span:last-child {
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
    text-align: left;
    flex: 1;
    display: block;
}



    .broker-detail-item span:last-child {
        font-size: 0.95rem;
    }

/* استایل‌های ریسپانسیو */
@media (max-width: 1200px) {
    .broker-listing-content {
        width: 100%;
        background: linear-gradient(to bottom right, #d0cbff, rgba(255, 242, 154, 0.2));
    }

    .broker-logo-ratings {
        width: 280px;
        margin-right: 1.8rem;
    }

    .page-title {
        font-size: 1.6rem;
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 992px) {
    .broker-logo-ratings {
        width: 100%;
        border-radius: 16px 16px 0 0;
        overflow: hidden;
        background: linear-gradient(to bottom right, #d0cbff, rgba(255, 242, 154, 0.2));        position: relative;
        margin: 0;
        padding: 0;
    }

    .broker-logo-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1.6 / 1;
        object-fit: cover;
        object-position: center;
        display: block;
        border-radius: 0;
    }



    /* Responsive styles */
    @media (max-width: 1200px) {
        .broker-listing-content {
            width: 100%;
            background: linear-gradient(to bottom right, #d0cbff, rgba(255, 242, 154, 0.2));
        }

        .broker-logo-ratings {
            width: 280px;
            margin-right: 1.8rem;
        }

        .page-title {
            font-size: 1.6rem;
            padding: 0.8rem 1.5rem;
        }
    }

    @media (max-width: 992px) {
        .broker-listing-content {
            width: 95%;
            padding: 1.5rem;
            background: linear-gradient(to bottom right, #d0cbff, rgba(255, 242, 154, 0.2));
        }

        .broker-logo-ratings {
            width: 250px;
            margin-right: 1.5rem;
            padding: 1.2rem;
        }

        .broker-logo {
            width: 110px;
            height: 110px;
        }

        .broker-logo span {
            font-size: 1.6rem;
        }

        .broker-details h2 {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .score-value, .pip-score {
            font-size: 1.8rem;
        }

        .broker-detail-item span:first-child {
            width: 130px;
            min-width: 130px;
        }
    }

    @media (max-width: 768px) {
        .broker-comparison-container {
            padding: 10px;
            background: linear-gradient(to bottom right, #ffffff, rgba(255, 242, 154, 0.2));
        }

        .broker-listing {
            margin-bottom: 20px;
            width: auto;
        }

        /* Main card in mobile view */
        .broker-listing-content {
            flex-direction: column;
            padding: 0;
            width: 95%;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            background-color: #fff;
        }

        /* Top part of the card - image */
        .broker-logo-ratings {
            width: 100%;
            height: auto;
            max-width: 100%;
            margin: 0;
            padding: 0;
            border-radius: 16px 16px 0 0;
            position: relative;
            background-color: #f9f9f9;
        }

        .broker-logo-container {
            width: 100%;
            margin: 0;
            padding: 0;
            position: relative;
        }

        /* Image style at the top of the card */
        .broker-logo-image {
            width: 100%;
            height: 200px;
            border-radius: 16px 16px 0 0 !important;
            border: none;
            object-fit: contain;
            background-color: #f9f9f9;
            margin: 0;
            padding: 10px;
        }

        /* Broker number */
        .broker-number-large {
            position: absolute;
            top: 10px;
            right: 10px;
            left: auto;
            width: 36px;
            height: 36px;
            font-size: 16px;
            z-index: 10;
        }

        /* Broker title */
        .broker-details h2 {
            font-size: 1.4rem;
            margin: 0.5rem 0;
            padding: 0.5rem 1rem;
            border-bottom: none;
            text-align: center;
            color: #1a1a1a;
            font-weight: 700;
        }

        /* Broker information section */
        .broker-details {
            padding: 0;
            background-color: #fff;
            order: 1;
        }

        /* Broker details list */
        .broker-details-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            padding: 0.5rem 1rem 1rem;
            background-color: #fff;
        }

        /* Each detail item */
        .broker-detail-item {
            flex-direction: column;
            padding: 0.5rem;
            margin: 0;
            border: 1px solid #eaeaea;
            border-radius: 8px;
            background-color: #f9f9f9;
            align-items: center;
            text-align: center;
        }

        .broker-detail-item:last-child {
            border: 1px solid #eaeaea;
        }

        /* Title of each item */
        .broker-detail-item span:first-child {
            width: 100%;
            min-width: auto;
            padding: 0;
            margin-bottom: 0.25rem;
            font-size: 0.75rem;
            color: #666;
            text-align: center;
        }

        /* Value of each item */
        .broker-detail-item span:last-child {
            width: 100%;
            font-size: 0.9rem;
            font-weight: 700;
            color: #1a1a1a;
            text-align: center;
        }

        /* Ratings section */
        .broker-ratings {
            padding: 0.5rem 1rem 1rem;
            order: 2;
            background-color: #fff;
        }

        /* Ratings box */
        .trustpilot-wrapper {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
            width: 100%;
            margin-bottom: 1rem;
        }

        .trustpilot-wrapper > div {
            max-width: 100%;
            background-color: #f9f9f9;
            padding: 0.5rem;
            border-radius: 8px;
            border: 1px solid #eaeaea;
        }

        /* Trustpilot score */
        .trustpilot-score {
            font-size: 1.2rem;
            color: #1a1a1a;
        }

        /* Stars */
        .star-rating {
            justify-content: center;
        }

        .star-rating svg {
            width: 14px;
            height: 14px;
        }

        /* Pip Penguin score */
        .pip-penguin-score {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            margin-bottom: 1rem;
            border-radius: 8px;
            border: 1px solid #eaeaea;
        }

        .pip-penguin-logo img {
            width: 40px;
            height: auto;
        }

        .pip-score {
            padding-inline-start: 25px;
            font-size: 1.2rem;
            font-weight: 700;
            color: #1a1a1a;
        }

        /* Buttons */
        .review-button {
            padding: 0.4rem 1rem;
            font-size: 0.8rem;
            border-radius: 20px;
            background-color: #f0f0f0;
            color: #333;
            border: none;
            margin-left: auto;
        }

        .visit-button {
            padding: 0.75rem 1.5rem;
            font-size: 1rem;
            width: 100%;
            background-color: #4150D3;
            color: white;
            border-radius: 8px;
            margin-top: 0.5rem;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
    }

    @media (max-width: 576px) {
        .broker-comparison-container {
            padding: 8px;
            background: linear-gradient(to bottom right, #d0cbff, rgba(255, 242, 154, 0.2));
        }

        .broker-listing-content {
            width: 100%;
        }

        /* Smaller image for very small screens */
        .broker-logo-image {
            height: 180px;
            object-fit: contain;
        }

        .broker-details h2 {
            font-size: 1.2rem;
        }

        /* Change to one column on very small screens */
        .broker-details-list {
            grid-template-columns: 1fr;
        }

        .trustpilot-wrapper {
            grid-template-columns: 1fr 1fr;
        }

        .trustpilot-wrapper > div:last-child {
            grid-column: span 2;
        }

        .page-title {
            font-size: 1.2rem;
            padding: 0.6rem 1rem;
            margin: 1rem auto;
            border-width: 1px;
        }
    }

    @media (max-width: 400px) {
        .broker-comparison-container {
            padding: 5px;
        }

        .broker-logo-image {
            height: 160px;
            object-fit: contain;
        }

        .broker-details h2 {
            font-size: 1.1rem;
        }

        .broker-detail-item span:last-child {
            font-size: 0.85rem;
        }

        .visit-button {
            padding: 0.6rem 1rem;
            font-size: 0.9rem;
        }