/* =========================================================
   Arabic Casinos — custom Gutenberg block styles.
   Loaded BOTH on the frontend and inside the editor.
   Content tables are styled in main.css (frontend only).
   ========================================================= */

/* ----- Inline format: red highlight ----- */
mark.ac-highlight,
.ac-highlight {
    background: transparent;
    color: var(--ac-accent, #c30f22);
    font-weight: 700;
    padding: 0 1px;
}

/* ----- Callout (golden equation box) ----- */
.ac-callout {
    padding: 24px;
    margin: 28px 0;
    background: rgba(214, 18, 40, 0.05);
    border: 1px solid rgba(214, 18, 40, 0.2);
    border-inline-start: 4px solid var(--ac-accent, #c30f22);
    border-radius: 12px;
}
.ac-callout__kicker {
    font-size: 11px;
    font-weight: 800;
    color: var(--ac-accent, #c30f22);
    margin-bottom: 8px;
    text-transform: none;
}
.ac-callout__headline {
    font-family: var(--ac-font-serif, system-ui, -apple-system, sans-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ac-text, #000000);
    margin-bottom: 8px;
    line-height: 1.35;
}
.ac-callout__body {
    font-size: 14px;
    font-weight: 450;
    color: var(--ac-text-muted, #2e2e33);
    line-height: 1.65;
}

/* ----- Casino Card (inline affiliate) ----- */
.ac-inline-card {
    margin: 32px 0;
    padding: 22px 24px;
    background: var(--ac-surface, #ffffff);
    border: 1px solid var(--ac-border, #e6e0e0);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.ac-inline-card__mark {
    flex-shrink: 0;
    width: 64px; height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ac-primary, #d61228), var(--ac-accent, #c30f22));
    color: #fff;
    display: grid; place-items: center;
    overflow: hidden;
}
.ac-inline-card__logo-img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 6px;
    background: rgba(13,13,15,0.04);
}
.ac-inline-card__logo-fallback,
.ac-inline-card__logo-placeholder {
    font-family: var(--ac-font-serif, system-ui, -apple-system, sans-serif);
    font-size: 30px; font-weight: 800;
    line-height: 1;
}
.ac-inline-card__body { flex: 1; min-width: 0; }
.ac-inline-card__kicker {
    font-size: 11px; font-weight: 800;
    color: var(--ac-accent, #c30f22);
    margin-bottom: 4px;
}
.ac-inline-card__name {
    font-size: 16px; font-weight: 700;
    color: var(--ac-text, #000000);
}
.ac-inline-card__tagline {
    font-size: 13px; font-weight: 500;
    color: var(--ac-text-muted, #2e2e33);
    margin-top: 3px;
    line-height: 1.5;
}
.ac-inline-card__cta-preview {
    padding: 12px 18px;
    background: rgba(214, 18, 40, 0.1);
    color: var(--ac-primary, #d61228);
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    border: 1.5px dashed rgba(214, 18, 40, 0.7);
}

/* ----- FAQ ----- */
.ac-faq { margin: 32px 0; }
.ac-faq__heading {
    font-family: var(--ac-font-serif, system-ui, -apple-system, sans-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--ac-text, #000000);
    margin: 0 0 18px;
}
.ac-faq__list { display: flex; flex-direction: column; gap: 8px; }

.ac-faq-item {
    background: var(--ac-surface, #ffffff);
    border: 1px solid var(--ac-border, #e6e0e0);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}
.ac-faq-item[open] { border-color: rgba(214, 18, 40, 0.35); }

.ac-faq-item__q {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--ac-text, #000000);
    font-size: 15px;
    font-weight: 700;

}
.ac-faq-item__q::-webkit-details-marker { display: none; }
/* 2.8.20: the question heading inherits the summary's type so the outline fix is invisible */
.ac-faq-item__h { margin: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit; flex: 1 1 auto; min-width: 0; }
.ac-faq-item__toggle {
    font-size: 22px;
    color: var(--ac-accent, #c30f22);
    font-weight: 300;
    transition: transform 0.2s ease;
}
.ac-faq-item[open] .ac-faq-item__toggle { transform: rotate(45deg); }
.ac-faq-item__a {
    padding: 0 22px 20px;
    font-size: 14px;
    font-weight: 450;
    color: var(--ac-text-muted, #2e2e33);
    line-height: 1.8;
}

/* Editor-mode FAQ items (don't have <details>) */
.ac-faq-item:not(details) {
    padding: 14px 16px;
}
.ac-faq-item:not(details) .ac-faq-item__q {
    padding: 0 0 8px;
    border-bottom: 1px dashed var(--ac-border, #e6e0e0);
}

/* ----- Pros / Cons — plain stacked lists, no boxes (editorial direction) ----- */
.ac-pros-cons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 640px;
    margin: 22px 0 26px;
}
.ac-pros-cons__col { padding: 0; }
.ac-pros-cons__heading-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.ac-pros-cons__icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 16px;
}
.ac-pros-cons__icon--plus  { background: rgba(214, 18, 40, 0.1); color: var(--ac-accent, #c30f22); }
.ac-pros-cons__icon--minus { background: rgba(13, 13, 15, 0.05); color: var(--ac-text-muted, #2e2e33); }
.ac-pros-cons__heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--ac-text, #000000);
}
.ac-pros-cons__list {
    list-style: none;
    margin: 0; padding: 0;
}
.ac-pros-cons__list li {
    font-size: 13px;
    font-weight: 450;
    color: var(--ac-text, #000000);
    line-height: 1.65;
    margin-bottom: 12px;
    padding-inline-start: 22px;
    position: relative;
}
.ac-pros-cons__col--pros .ac-pros-cons__list li::before {
    content: '✓';
    position: absolute;
    inset-inline-start: 0; top: 0;
    color: var(--ac-accent, #c30f22);
    font-weight: 800;
}
.ac-pros-cons__col--cons .ac-pros-cons__list li::before {
    content: '−';
    position: absolute;
    inset-inline-start: 0; top: 0;
    color: var(--ac-text-muted, #2e2e33);
    font-weight: 800;
}

/* ----- Score Breakdown (parent box) + Score Bar (child) ----- */
.ac-score-breakdown {
    margin: 32px 0;
    background: var(--ac-surface, #ffffff);
    border: 1px solid var(--ac-border, #e6e0e0);
    border-radius: 14px;
    padding: 28px;
}
.ac-score-breakdown__heading {
    font-family: var(--ac-font-serif, system-ui, -apple-system, sans-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ac-text, #000000);
    margin: 0 0 22px;
}
.ac-score-breakdown__list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ac-score-bar {
    margin: 0;
}
.ac-score-bar__row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.ac-score-bar__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ac-text, #000000);
}
.ac-score-bar__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--ac-accent, #c30f22);
}
.ac-score-bar__track {
    height: 6px;
    background: var(--ac-surface-alt, #f7f4f4);
    border-radius: 3px;
    overflow: hidden;
}
.ac-score-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ac-primary, #d61228), var(--ac-accent, #c30f22));
    border-radius: 3px;
}

/* ----- Quick Facts (parent) + Quick Fact (child) -----
   --ac-qf-cols is set inline on the parent (defaults to 6). The grid uses it to lay out columns. */
.ac-quick-facts {
    --ac-qf-cols: 6;
    display: grid;
    grid-template-columns: repeat(var(--ac-qf-cols), 1fr);
    background: var(--ac-surface-alt, #f7f4f4);
    border: 1px solid var(--ac-border, #e6e0e0);
    border-radius: 14px;
    overflow: hidden;
    margin: 32px 0;
}
.ac-quick-facts .ac-quick-fact {
    padding: 20px 18px;
    background: transparent;
    border: none;
    border-radius: 0;
    border-inline-end: 1px solid var(--ac-border, #e6e0e0);
}
.ac-quick-facts .ac-quick-fact:last-child { border-inline-end: none; }

.ac-quick-fact {
    padding: 20px 18px;
    background: var(--ac-surface-alt, #f7f4f4);
    border: 1px solid var(--ac-border, #e6e0e0);
    border-radius: 12px;
}
.ac-quick-fact__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ac-text-muted, #2e2e33);
    margin-bottom: 6px;
}
.ac-quick-fact__value {
    font-size: 15px;
    font-weight: 700;
    color: var(--ac-text, #000000);
}

@media (max-width: 980px) {
    .ac-quick-facts { grid-template-columns: repeat(min(var(--ac-qf-cols), 3), 1fr); }
    .ac-quick-facts .ac-quick-fact:nth-child(3n) { border-inline-end: none; }
}
@media (max-width: 560px) {
    .ac-quick-facts { grid-template-columns: 1fr 1fr; }
    .ac-quick-facts .ac-quick-fact:nth-child(2n) { border-inline-end: none; }
}

/* ----- Native Pull Quote — "Red Bar" block style ----- */
.wp-block-pullquote.is-style-ac-redbar {
    border: none;
    border-inline-start: 3px solid var(--ac-accent, #c30f22);
    padding: 8px 24px;
    margin: 24px 0;
    background: transparent;
    text-align: start;

}
.wp-block-pullquote.is-style-ac-redbar p {
    font-family: var(--ac-font-serif, system-ui, -apple-system, sans-serif);
    font-size: 22px;
    font-weight: 550;
    line-height: 1.5;
    color: var(--ac-text, #000000);
    text-wrap: balance;
}
.wp-block-pullquote.is-style-ac-redbar cite {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-text-muted, #2e2e33);
    font-style: normal;
}

/* Responsive */
@media (max-width: 720px) {
    .ac-pros-cons { grid-template-columns: 1fr; }
    .ac-inline-card { flex-direction: column; align-items: flex-start; }
    .ac-inline-card__cta-preview { align-self: stretch; text-align: center; }
}


/* ----- Editor-mode grid for Quick Facts (InnerBlocks wrapper) ----- */
.editor-styles-wrapper .ac-quick-facts .block-editor-inner-blocks,
.editor-styles-wrapper .ac-quick-facts > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: grid;
    grid-template-columns: repeat(var(--ac-qf-cols, 6), 1fr);
    width: 100%;
}
.editor-styles-wrapper .ac-quick-facts .block-editor-block-list__layout > .wp-block {
    margin: 0;
    max-width: none;
    border-inline-end: 1px solid var(--ac-border, #e6e0e0);
    padding: 0;
}
.editor-styles-wrapper .ac-quick-facts .block-editor-block-list__layout > .wp-block:last-child {
    border-inline-end: none;
}
.editor-styles-wrapper .ac-quick-facts .ac-quick-fact {
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 20px 18px;
}


/* ============================================================
   TOC — inline anchor list (matches the real articles)
   ============================================================ */
.ac-toc {
    margin: 32px 0;
    padding: 24px 28px;
    background: var(--ac-surface-alt);
    border: 1px solid var(--ac-border);
    border-radius: 12px;
}
.ac-toc__heading {
    font-size: 15px;
    font-weight: 800;
    color: var(--ac-text);
    margin-bottom: 14px;
}
.ac-toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ac-toc__list li { font-size: 15px; font-weight: 500; line-height: 1.5; padding-inline-start: 18px; position: relative; }
.ac-toc__list li::before {
    content: '›';
    position: absolute; inset-inline-start: 0; top: -1px;
    color: var(--ac-accent); font-weight: 800;
}
.ac-toc__list a { color: var(--ac-text); text-decoration: none; }
.ac-toc__list a:hover { color: var(--ac-accent); text-decoration: underline; }

/* ============================================================
   Casino Entry — listicle item (heading + narrative + pros/cons)
   ============================================================ */
.ac-entry {
    margin: 40px 0;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--ac-border);
}
.ac-entry__name {
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--ac-text);
    margin: 0 0 14px;
    text-wrap: pretty;
}
.ac-entry__body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--ac-text);
    margin: 0 0 22px;
}
.ac-entry__lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.ac-entry__label {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 10px;
}
.ac-entry__col--pros .ac-entry__label { color: var(--ac-accent); }
.ac-entry__col--cons .ac-entry__label { color: var(--ac-text-muted); }
.ac-entry__list { list-style: none; margin: 0; padding: 0; }
.ac-entry__list li {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 8px;
    padding-inline-start: 20px;
    position: relative;
    color: var(--ac-text);
}
.ac-entry__col--pros .ac-entry__list li::before {
    content: '✓'; position: absolute; inset-inline-start: 0; top: 0;
    color: var(--ac-accent); font-weight: 800;
}
.ac-entry__col--cons .ac-entry__list li::before {
    content: '−'; position: absolute; inset-inline-start: 0; top: 0;
    color: var(--ac-text-muted); font-weight: 800;
}
/* Optional review link (2.8.18) — printed only when reviewUrl is set. */
.ac-entry__review {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    margin: 18px 0 0;
}
.ac-entry__review-link { color: var(--ac-accent); text-decoration: none; }
.ac-entry__review-link:hover { text-decoration: underline; }

/* ============================================================
   Labelled Note — bold-label mini section
   ============================================================ */
.ac-note { margin: 26px 0; }
.ac-note__label {
    font-size: 17px;
    font-weight: 800;
    color: var(--ac-text);
    margin-bottom: 8px;
}
.ac-note__body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--ac-text);
}

/* ============================================================
   Author Bio — end-of-article box
   ============================================================ */
.ac-author {
    margin: 48px 0 0;
    padding: 28px;
    background: var(--ac-surface-alt);
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    display: flex;
    gap: 22px;
    align-items: flex-start;
}
.ac-author__photo {
    flex-shrink: 0;
    width: 88px; height: 88px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    display: grid; place-items: center;
    font-size: 32px;
}
.ac-author__photo img { width: 100%; height: 100%; object-fit: cover; }
.ac-author__name {
    font-size: 20px;
    font-weight: 800;
    color: var(--ac-text);
}
.ac-author__role {
    font-size: 13px;
    font-weight: 700;
    color: var(--ac-accent);
    margin: 4px 0 10px;
}
.ac-author__bio {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.75;
    color: var(--ac-text);
}
.ac-author__link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ac-accent);
}

@media (max-width: 720px) {
    .ac-entry__lists { grid-template-columns: 1fr; gap: 18px; }
    .ac-author { flex-direction: column; }
}


/* ============================================================
   Byline block — avatar + name + meta
   ============================================================ */
.ac-byline-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ac-text-muted);
}
.ac-byline-block__avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--ac-surface-alt);
    border: 1px solid var(--ac-border);
}
.ac-byline-block__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-byline-block__prefix { color: var(--ac-text-muted); white-space: nowrap; }
.ac-byline-block__meta,
.ac-byline-block__name { white-space: nowrap; }
.ac-byline-block__name   { font-weight: 800; color: var(--ac-text); text-decoration: none; }
a.ac-byline-block__name:hover { color: var(--ac-accent); }
.ac-byline-block__sep    { opacity: 0.4; }
.ac-byline-block__meta   { color: var(--ac-text-muted); }
.ac-byline-block__meta strong { color: var(--ac-text); font-weight: 700; }

/* ============================================================
   Hub Cards — grid of link cards
   ============================================================ */
.ac-hub-cards {
    --ac-hub-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--ac-hub-cols), 1fr);
    gap: 14px;
    margin: 32px 0;
}
.ac-hub-card {
    display: block;
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    padding: 22px 24px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
a.ac-hub-card:hover { border-color: var(--ac-accent); transform: translateY(-2px); }
.ac-hub-card__icon {
    display: block;
    width: 44px; height: 44px;
    margin-bottom: 14px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ac-surface-alt);
}
.ac-hub-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.ac-hub-card__name {
    font-size: 18px;
    font-weight: 800;
    color: var(--ac-text);
    margin-bottom: 8px;
}
.ac-hub-card__desc {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--ac-text-muted);
    margin-bottom: 14px;
}
.ac-hub-card__cta {
    font-size: 13px;
    font-weight: 800;
    color: var(--ac-accent);
    white-space: nowrap;
}

/* Editor grid for hub cards */
.editor-styles-wrapper .ac-hub-cards .block-editor-inner-blocks,
.editor-styles-wrapper .ac-hub-cards > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: grid;
    grid-template-columns: repeat(var(--ac-hub-cols, 3), 1fr);
    gap: 14px;
    width: 100%;
}
.editor-styles-wrapper .ac-hub-cards .block-editor-block-list__layout > .wp-block { margin: 0; max-width: none; }

/* ============================================================
   Do / Don't
   ============================================================ */
.ac-dodont {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 32px 0;
}
.ac-dodont__col {
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    padding: 24px;
}
.ac-dodont__label {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
}
.ac-dodont__col--do   .ac-dodont__label { color: var(--ac-accent); }
.ac-dodont__col--dont .ac-dodont__label { color: var(--ac-text-muted); }
.ac-dodont__list { list-style: none; margin: 0; padding: 0; }
.ac-dodont__list li {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 9px;
    padding-inline-start: 22px;
    position: relative;
    color: var(--ac-text);
}
.ac-dodont__col--do .ac-dodont__list li::before {
    content: '✓'; position: absolute; inset-inline-start: 0; top: 0;
    color: var(--ac-accent); font-weight: 800;
}
.ac-dodont__col--dont .ac-dodont__list li::before {
    content: '✗'; position: absolute; inset-inline-start: 0; top: 0;
    color: var(--ac-text-muted); font-weight: 800;
}

/* ============================================================
   How-To Steps
   ============================================================ */
.ac-howto { margin: 36px 0; }
.ac-howto__heading {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ac-text);
    margin: 0 0 18px;
}
.ac-howto__list {
    counter-reset: ac-step;
    list-style: none;
    margin: 0;
    padding: 0;
}
.ac-howto__list li {
    counter-increment: ac-step;
    position: relative;
    padding: 0; padding-inline-start: 48px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.75;
    color: var(--ac-text);
    min-height: 34px;
}
.ac-howto__list li::before {
    content: counter(ac-step);
    position: absolute;
    inset-inline-start: 0; top: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--ac-accent);
    color: #fff;
    display: grid; place-items: center;
    font-size: 15px;
    font-weight: 800;
}

/* Casino Entry cons now use ✗ to match the live articles */
.ac-entry__col--cons .ac-entry__list li::before { content: '✗'; }

@media (max-width: 900px) {
    .ac-hub-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ac-hub-cards { grid-template-columns: 1fr; }
    .ac-dodont { grid-template-columns: 1fr; }
    .ac-byline-block { font-size: 13px; }
}

/* Live countdown clock — tabular figures keep the width stable as digits change */
.ac-countdown__clock {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--ac-text);
    direction: ltr;
    display: inline-block;
}

