/* Al-Ahly system frontend styles. Extracted from shortcode templates in version 3.5. */

/* matches.php */
.ahly-matches-box{background:#fff!important;color:#111!important;border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;font-family:"Noto Kufi Arabic", sans-serif !important;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.ahly-section-title{display:flex;align-items:center;justify-content:flex-start;gap:10px;background:#f7f7f7;color:#111;padding:13px 16px;font-weight:bold;font-size:17px;border-bottom:1px solid #e9e9e9}
.ahly-section-title::before{content:"";width:14px;height:14px;border-radius:50%;display:inline-block}.ahly-section-title.red-dot::before{background:#e51b2b}.ahly-section-title.green-dot::before{background:#3ccf7a}
.ahly-match-row{display:grid;grid-template-columns:130px 1fr 145px;align-items:center;gap:12px;min-height:64px;padding:10px 16px;border-bottom:1px solid #eee;background:#fff}.ahly-match-row:nth-child(even){background:#fbfbfb}
.ahly-league{font-size:12px;color:#777;text-align:right}.ahly-match-main{display:grid;grid-template-columns:1fr 78px 1fr;align-items:center;gap:10px}.ahly-team{display:flex;align-items:center;gap:8px;min-width:0;font-size:14px;font-weight:600}
.ahly-team.team-left{justify-content:flex-end;flex-direction:row;text-align:right}.ahly-team.team-right{justify-content:flex-start;text-align:right}.ahly-team.team-right img{order:2}.ahly-team.team-right span{order:1}
.ahly-team img{width:30px;height:30px;object-fit:contain;flex:0 0 auto}.ahly-team span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ahly-score-pill{background:#e51b2b;color:#fff;border-radius:18px;padding:7px 10px;font-weight:bold;font-size:14px;text-align:center;min-width:58px}.ahly-score-pill.vs{background:#f1f1f1;color:#333}
.ahly-date{font-size:12px;color:#666;text-align:left;direction:ltr}.ahly-empty{padding:18px 16px;color:#777;background:#fff;border-bottom:1px solid #eee;text-align:center}.ahly-more-link{padding:12px 16px;background:#fff;text-align:center;border-bottom:1px solid #eee}.ahly-more-link a{color:#e51b2b;font-weight:bold;text-decoration:none}.ahly-more-link a:hover{text-decoration:underline}.ahly-next-match-source-row .ahly-league>span,.ahly-next-match-source-row .ahly-date>span{display:block!important;width:100%!important;line-height:1.6!important;white-space:nowrap!important}
.ahly-fixture-id{display:block;margin-top:4px;color:#e51b2b;font-weight:bold}
.ahly-fixture-ids-box{background:#fff;color:#111;border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;font-family:"Noto Kufi Arabic", sans-serif !important;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.ahly-fixture-ids-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;background:#f7f7f7;border-bottom:1px solid #e9e9e9}
.ahly-fixture-ids-head span{color:#666;font-size:12px}.ahly-fixture-ids-scroll{overflow-x:auto}.ahly-fixture-ids-table{width:100%;border-collapse:collapse;font-size:13px}
.ahly-fixture-ids-table th,.ahly-fixture-ids-table td{padding:10px;border-bottom:1px solid #eee;text-align:right;white-space:nowrap}.ahly-fixture-ids-table th{background:#fbfbfb;color:#555;font-weight:800}
.ahly-fixture-id-num{color:#e51b2b;font-weight:800;direction:ltr}.ahly-fixture-ids-table code{direction:ltr;display:inline-block}
.ahly-copy-btn{margin-right:8px;border:1px solid #ddd;border-radius:6px;background:#fff;color:#333;cursor:pointer;font-size:12px;font-weight:700;line-height:1;padding:6px 9px;vertical-align:middle}
.ahly-copy-btn:hover{border-color:#e51b2b;color:#e51b2b}.ahly-copy-btn.is-copied{background:#e8f5ee;border-color:#2eaf4a;color:#157a3d}
@media(max-width:768px){.ahly-match-row{grid-template-columns:1fr;gap:7px;text-align:center;padding:10px 6px}.ahly-league,.ahly-date{text-align:center}.ahly-match-main{grid-template-columns:minmax(0,1fr) minmax(58px,auto) minmax(0,1fr);gap:4px}.ahly-team{flex-direction:column!important;justify-content:flex-start!important;align-items:center!important;gap:4px;font-size:12px;text-align:center}.ahly-team.team-left,.ahly-team.team-right{flex-direction:column!important;text-align:center}.ahly-team.team-right img,.ahly-team.team-right span{order:initial}.ahly-team img{width:28px;height:28px}.ahly-team span{display:-webkit-box!important;width:100%;max-width:100%!important;white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;overflow-wrap:anywhere;word-break:normal;line-height:1.35;-webkit-line-clamp:2;-webkit-box-orient:vertical}.ahly-score-pill{min-width:58px;padding:7px 8px;white-space:nowrap}}

/* standings.php */
.ahly-standings-365 {
    background: #fff;
    color: #111;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    font-family: "Noto Kufi Arabic", sans-serif !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.ahly-standings-header {
    background: #f7f7f7;
    border-bottom: 1px solid #e9e9e9;
    padding: 13px 16px;
    font-size: 17px;
    font-weight: bold;
    color: #111;
}

.ahly-standings-group-title {
    padding: 32px 26px 8px;
    font-size: 15px;
    font-weight: bold;
    color: #e53935;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.ahly-standings-scroll {
    width: 100%;
    overflow-x: auto;
}

.ahly-standings-table-365 {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
    text-align: center;
}

.ahly-standings-table-365 th {
    height: 34px;
    background: #f3f3f3;
    color: #555;
    font-weight: bold;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
    padding: 0 8px;
    width: 1%;
}

.ahly-standings-table-365 td {
    height: 43px;
    border-bottom: 1px solid #eee;
    background: #fff;
    white-space: nowrap;
    padding: 0 8px;
    width: 1%;
}

.ahly-standings-table-365 td.goal-diff{
    direction: rtl !important;
    unicode-bidi: isolate !important;
    text-align: center;
}

.ahly-standings-table-365 td.goal-diff .goal-separator{
    display: inline-block;
    direction: rtl;
    unicode-bidi: isolate;
    margin: 0 2px;
}
    
	.ahly-standings-table-365 tr:nth-child(even) td {
    background: #fbfbfb;
}

.ahly-standings-table-365 tr.is-ahly td {
    background: #f7dbdb !important;
    font-weight: bold;
}

.ahly-standings-table-365 tr.qualified td:first-child {
    border-right: 6px solid #2eaf4a;
}

.ahly-standings-table-365 tr.confederation td:first-child {
    border-right: 6px solid #f9a825;
}

.ahly-standings-table-365 tr.relegation td:first-child {
    border-right: 6px solid #e53935;
}

.ahly-standings-table-365 .rank-col {
    width: 40px;
    min-width: 40px;
    font-weight: bold;
}

.ahly-standings-table-365 .team-col {
    width: auto;
    min-width: 145px;
    text-align: right;
    padding-right: 8px;
}

.ahly-standings-table-365 .team-col img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 8px;
}

.ahly-standings-table-365 .points {
    font-weight: bold;
    color: #111;
}

.ahly-standings-table-365 .form-col {
    min-width: 132px;
}

.ahly-standings-table-365 td.form-col {
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

.ahly-form-sequence {
    display: inline-flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
}

.ahly-standings-table-365 .next-col {
    min-width: 44px;
}

.ahly-standings-table-365 .next-col img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    cursor:pointer;
}

.ahly-form-dot {
    display: inline-flex;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0;
    border: none;
    cursor: pointer;
}

.ahly-form-dot.win {
    color: #fff;
    background: #2eaf4a;
}

.ahly-form-dot.draw {
    color: #fff;
    background: #f9a825;
}

.ahly-form-dot.loss {
    color: #fff;
    background: #e53935;
}

.ahly-form-dot[data-ahly-form-tooltip] {
    position: relative;
    outline: none;
}

.ahly-form-dot[data-ahly-form-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(50%);
    width: max-content;
    max-width: 240px;
    padding: 7px 9px;
    border-radius: 6px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
    text-align: center;
    direction: rtl;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: 20;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.ahly-form-dot[data-ahly-form-tooltip]::before {
    content: "";
    position: absolute;
    right: 50%;
    bottom: calc(100% + 3px);
    transform: translateX(50%);
    border: 5px solid transparent;
    border-top-color: #111;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: 21;
}

.ahly-form-dot[data-ahly-form-tooltip]:hover::after,
.ahly-form-dot[data-ahly-form-tooltip]:hover::before,
.ahly-form-dot[data-ahly-form-tooltip]:focus-visible::after,
.ahly-form-dot[data-ahly-form-tooltip]:focus-visible::before,
.ahly-form-dot.is-tooltip-open::after,
.ahly-form-dot.is-tooltip-open::before {
    opacity: 1;
    visibility: visible;
}
.ahly-form-empty {
    color: #999;
}

.ahly-standings-legend {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    color: #777;
    font-size: 12px;
    border-top: 1px solid #eee;
}

.ahly-standings-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-left: 5px;
}

.ahly-standings-legend .q {
    background: #2eaf4a;
}

.ahly-standings-legend .c {
    background: #f9a825;
}

.ahly-standings-legend .r {
    background: #e53935;
}

@media(max-width: 768px) {
    .ahly-standings-table-365 {
        width: 860px !important;
        min-width: 860px !important;
        table-layout: fixed !important;
    }

    .ahly-standings-table-365 th,
    .ahly-standings-table-365 td {
        padding-right: 3px !important;
        padding-left: 3px !important;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
    }

    .ahly-standings-table-365 .rank-col {
        width: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }

    .ahly-standings-table-365 .team-col {
        width: 240px !important;
        min-width: 240px !important;
        max-width: none !important;
        padding-right: 4px !important;
        padding-left: 4px !important;
    }

    .ahly-standings-table-365 .team-col span {
        display: inline-block;
        width: auto !important;
        max-width: 190px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        vertical-align: middle;
    }

    .ahly-standings-table-365 .team-col img {
        width: 20px !important;
        height: 20px !important;
        margin-left: 3px !important;
    }

    .ahly-standings-table-365 .form-col {
        width: 112px !important;
        min-width: 112px !important;
        max-width: 112px !important;
    }

    .ahly-standings-table-365 .next-col {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
    }

    .ahly-standings-header {
        font-size: 15px;
    }
}
