/*
|--------------------------------------------------------------------------
| LWFG — Competition Single — Header
|--------------------------------------------------------------------------
*/

.lwf-competition-header {
    width: calc(100% - 48px);
    max-width: 1320px;
    margin: 20px auto 0;
    box-sizing: border-box;
}


/* =========================================================
   Competition Header
   ========================================================= */

.lwf-competition-header-inner {
    position: relative;

    display: grid;

    grid-template-columns:
        150px
        minmax(0, 1fr)
        190px;

    grid-template-rows:
        minmax(150px, 1fr)
        60px;

grid-template-areas:
    "logo content filters"
    "tabs tabs tabs";

    align-items: center;

    column-gap: 28px;
    row-gap: 0;

    min-height: 235px;

    padding: 28px 20px 0;

    background: #fff;
    color: #111827;

    border: 1px solid #e1e5ea;
    border-radius: 18px;

    overflow: hidden;

    box-sizing: border-box;

    direction: rtl;
}


/* =========================================================
   Filters
   الموسم + الفئة
   ========================================================= */

.lwf-competition-header-filters {
    grid-area: filters;

       width: 350px;

    display: flex;
    flex-direction: row;

    align-items: flex-start;
    justify-content: flex-start;

    gap: 10px;

    direction: rtl;

    justify-self: end;
}

.lwf-competition-header-filter {
    width: 165px;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
    justify-content: center;

    gap: 8px;

    direction: rtl;

    text-align: right;
}

.lwf-competition-header-filter-label {
    display: flex;
    align-items: center;

    color: #111827;

    font-size: 14px;
    line-height: 1.3;

    opacity: .92;
}

.lwf-competition-header-filter-form {
    width: 100%;
}

.lwf-competition-header-filter-form select {
    width: 100%;
    min-height: 42px;

        border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background-color: #fff;

    box-sizing: border-box;

    padding: 0 14px;

    border: 0;
    border-radius: 10px;

    background-color: #ffffff;
    color: #111827;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 12px 12px;

    cursor: pointer;
}

.lwf-competition-header-filter-form select:focus {
    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(0, 102, 51, .15);
}


/* =========================================================
   Competition Content
   ========================================================= */

.lwf-competition-header-content {
    grid-area: content;

    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
    justify-content: center;

    gap: 5px;

    direction: rtl;

    text-align: right;

    justify-self: start;
    margin-right: -38px;
}

.lwf-competition-header-content h1 {
    margin: 0;

    color: #111827;

    font-size: 28px;
    line-height: 1.25;

    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lwf-competition-header-content p {
    margin: 0;

    color: #6b7280;

    font-size: 14px;
    line-height: 1.4;
}


/* =========================================================
   Competition Logo
   ========================================================= */

.lwf-competition-header-logo {
    grid-area: logo;

    width: 105px;
    height: 105px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    margin: 0;
    margin-right: 20px;

    background: transparent;

    border: 0;
    border-radius: 0;

    box-sizing: border-box;

    justify-self: start;

}

.lwf-competition-header-logo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* =========================================================
   Tabs
   ========================================================= */

.competition-single-tabs {
    grid-area: tabs;

    display: flex;
    align-items: stretch;
    justify-content: flex-start;

    width: auto;

    direction: rtl;

    gap: 4px;

    justify-self: start;
    margin-right: -34px;
}

.competition-single-tab {
    position: relative;

    min-width: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 6px;

    color: #6b7280;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    white-space: nowrap;

    transition:
        color .2s ease,
        background-color .2s ease;
}

.competition-single-tab:hover,
.competition-single-tab.active {
    color: #111827;
}

.competition-single-tab.active::after {
    content: "";

    position: absolute;

    right: 6%;
left: 6%;

    bottom: 0;

    height: 2px;

    background: #008F4C;

    border-radius: 3px 3px 0 0;
}

/*
|--------------------------------------------------------------------------
| Mobile — نفس تخطيط هيدر الفريق
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .lwf-competition-header {
        width: calc(100% - 24px);
        max-width: none;
        margin: 12px auto 0;
    }

    .lwf-competition-header-inner {
        display: grid;

        grid-template-columns:
            125px
            minmax(0, 1fr)
            76px;

        grid-template-rows:
            minmax(120px, auto)
            58px;

        grid-template-areas:
            "logo content filters"
            "tabs tabs tabs";

        column-gap: 8px;
        row-gap: 0;

        min-height: 0;

        padding: 18px 14px 0;

        border-radius: 14px;

        direction: rtl;
    }

    /* الشعار — يمين */
.lwf-competition-header-logo {
    grid-area: logo;

    width: 68px;
    height: 68px;

    justify-self: start;
    align-self: center;

    margin: 0;
    margin-right: -7px;
}

    /* اسم المنافسة */
    .lwf-competition-header-content {
        grid-area: content;

        min-width: 0;

        align-items: flex-start;

        justify-self: start;

        text-align: right;

        margin: 0;
        padding: 0;
        transform: none;
        margin-right: -60px;
    }

    .lwf-competition-header-content h1 {
        max-width: 100%;

        font-size: 17px;
        line-height: 1.3;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lwf-competition-header-content p {
        font-size: 11px;
        line-height: 1.3;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* الفلاتر — يسار */
    .lwf-competition-header-filters {
        grid-area: filters;

        width: 125px;

        display: flex;
        flex-direction: column;

        align-items: stretch;
        justify-content: center;

        gap: 5px;

        justify-self: start;
        align-self: center;

        direction: rtl;
        margin-right: -70px;
    }

    .lwf-competition-header-filter {
        width: 100%;

        display: block;
    }

    .lwf-competition-header-filter-label {
        display: none;
    }

    .lwf-competition-header-filter-form {
        width: 100%;
    }

    .lwf-competition-header-filter-form select {
        width: 100%;

        min-height: 36px;

        padding: 0 10px;

        font-size: 11px;

        background-position: left 10px center;
    }

    /* التبويبات */
    .competition-single-tabs {
        grid-area: tabs;

        width: 100%;
        height: 58px;

        display: flex;
        align-items: stretch;
        justify-content: space-between;

        direction: rtl;

        margin: 0;
    }

    .competition-single-tab {
        flex: 1;
        min-width: 0;

        padding: 0 4px;

        font-size: 11px;
    }

    .competition-single-tab.active::after {
        right: 7%;
        left: 7%;

        height: 3px;
    }
}


/*
|--------------------------------------------------------------------------
| Very small screens
|--------------------------------------------------------------------------
*/

@media (max-width: 420px) {

    .lwf-competition-header-inner {
        grid-template-columns:
            105px
            minmax(0, 1fr)
            62px;

        column-gap: 6px;

        padding-left: 10px;
        padding-right: 10px;
    }

    .lwf-competition-header-logo {
        width: 56px;
        height: 56px;
    }

    .lwf-competition-header-filters {
        width: 105px;
    }

    .lwf-competition-header-content h1 {
        font-size: 15px;
    }

    .lwf-competition-header-content p {
        font-size: 10px;
    }

    .competition-single-tab {
        padding: 0 2px;
        font-size: 10px;
    }
}

/* =========================================================
   French — Competition Header LTR
   ========================================================= */

.lwf-competition-header--fr .lwf-competition-header-inner {
    direction: ltr;
}

.lwf-competition-header--fr .lwf-competition-header-filters {
    direction: ltr;
    justify-self: end;
}

.lwf-competition-header--fr .lwf-competition-header-filter {
    direction: ltr;
    align-items: flex-start;
    text-align: left;
}

.lwf-competition-header--fr .lwf-competition-header-content {
    direction: ltr;
    align-items: flex-start;
    justify-self: start;
    text-align: left;
    margin-right: 0;
    margin-left: -35px;
}

.lwf-competition-header--fr .lwf-competition-header-logo {
    justify-self: start;
    margin-right: 0;
    transform: translateX(25px);
}

.lwf-competition-header--fr .competition-single-tabs {
    direction: ltr;
    justify-content: flex-start;
    justify-self: start;
    margin-right: 0;
}


/* =========================================================
   French — Competition Header Mobile
   ========================================================= */

@media (max-width: 700px) {

    .lwf-competition-header--fr .lwf-competition-header-inner {
        direction: ltr;
    }

  .lwf-competition-header--fr .lwf-competition-header-logo {
    justify-self: start;
    margin: 0 0 0 -25px;
}

    .lwf-competition-header--fr .lwf-competition-header-content {
        direction: ltr;
        align-items: flex-start;
        justify-self: start;
        text-align: left;
        margin: 0 0 0 -50px;
padding: 0;
    }

    .lwf-competition-header--fr .lwf-competition-header-filters {
        direction: ltr;
        justify-self: end;
        margin-right: 0;
    }

    .lwf-competition-header--fr .competition-single-tabs {
        direction: ltr;
        justify-content: space-between;
        margin: 0;
    }

}

.lwf-competition-header--fr .lwf-competition-header-filter-form select {
    background-position: right 14px center;
}

@media (max-width: 700px) {

    .lwf-competition-header--fr .lwf-competition-header-filter-form select {
        background-position: right 10px center;
    }

}