/**
 * EBA — The Text Me Tool™
 *
 * Clean, calm interface for browsing therapist-crafted text scripts.
 * Palette: ivory ground, charcoal ink, gold accent, sage secondary.
 */

.eba-wrapper.eba-txt-wrap { color: #2d3548; font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

.eba-txt { background: #f7f4ed; }
.eba-txt__container { max-width: 1120px; margin: 0 auto; padding: 0 4px; }

/* ==================== HEAD ==================== */
.eba-txt__head { text-align: center; margin: 0 auto 44px; max-width: 720px; }
.eba-txt__eyebrow {
    display: inline-block;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
    color: #c99a54;
    margin-bottom: 18px;
    padding: 6px 14px;
    background: rgba(201, 154, 84, 0.10);
    border-radius: 999px;
}
.eba-txt__title {
    font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif !important;
    font-size: clamp(34px, 5vw, 52px) !important;
    font-weight: 500 !important;
    color: #0f1c2e !important;
    line-height: 1.1 !important;
    letter-spacing: -0.015em;
    margin: 0 0 18px !important;
    text-wrap: balance;
}
.eba-txt__tagline {
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-style: italic;
    font-size: 18px !important;
    color: #c99a54 !important;
    line-height: 1.5 !important;
    margin: 0 0 16px !important;
    max-width: 42ch; margin-left: auto; margin-right: auto;
}
.eba-txt__desc {
    font-size: 15.5px !important;
    line-height: 1.65 !important;
    color: #4a5573 !important;
    margin: 0 !important;
    max-width: 58ch; margin-left: auto; margin-right: auto;
}

/* ==================== FILTERS ==================== */
.eba-wrapper.eba-txt-wrap .eba-txt__filters {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
    justify-content: center !important;
    margin: 0 auto 32px !important;
    max-width: 900px;
    padding: 0 !important;
    list-style: none;
}
/* Fight theme (Bricks/Hello Elementor) button-primary overrides — the chip
   is a native <button>, themes color those pink/red by default. Wrap-scoped
   !important beats theme cascade without polluting the rest of the page. */
.eba-wrapper.eba-txt-wrap .eba-txt__chip,
.eba-wrapper.eba-txt-wrap button.eba-txt__chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(15, 28, 46, 0.15) !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4a5573 !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__chip:hover,
.eba-wrapper.eba-txt-wrap button.eba-txt__chip:hover {
    border-color: #c99a54 !important;
    color: #0f1c2e !important;
    background: transparent !important;
    background-image: none !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__chip.is-active,
.eba-wrapper.eba-txt-wrap button.eba-txt__chip.is-active {
    background: #0f1c2e !important;
    background-image: none !important;
    border-color: #0f1c2e !important;
    color: #f7f4ed !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__chip-count {
    font-variant-numeric: tabular-nums;
    font-size: 11px !important;
    opacity: 0.65;
    font-weight: 500 !important;
    color: inherit !important;
}

/* ==================== GRID ==================== */
.eba-txt__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ==================== CARD ==================== */
.eba-txt__card {
    background: #ffffff;
    border: 1px solid rgba(15, 28, 46, 0.06);
    border-radius: 16px;
    padding: 22px;
    display: flex; flex-direction: column;
    box-shadow: 0 1px 2px rgba(15,28,46,0.03), 0 8px 20px -14px rgba(15,28,46,0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.eba-txt__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(15,28,46,0.05), 0 16px 32px -14px rgba(15,28,46,0.18);
    border-color: rgba(201, 154, 84, 0.35);
}
.eba-txt__card.is-hidden { display: none; }
/* Load-More gate — cards beyond `initial_visible` count. Toggled by JS on Load More click. */
.eba-txt__card.is-more-hidden { display: none; }

.eba-txt__card-cat {
    display: inline-block;
    align-self: flex-start;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: #c99a54 !important;
    padding: 4px 10px;
    border: 1px solid #c99a54;
    border-radius: 999px;
    margin-bottom: 14px;
}
.eba-txt__card-text {
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-size: 19px !important;
    line-height: 1.5 !important;
    color: #0f1c2e !important;
    margin: 0 0 20px !important;
    flex: 1;
    letter-spacing: -0.005em;
}
.eba-txt__card-actions {
    display: flex; gap: 10px; align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(15,28,46,0.06);
    flex-wrap: wrap;
}

/* ==================== BUTTONS ====================
   All button styles wrap-scoped + !important to fight theme injection
   (Bricks/Hello Elementor color <button> as pink by default). */
.eba-wrapper.eba-txt-wrap .eba-txt__btn,
.eba-wrapper.eba-txt-wrap button.eba-txt__btn,
.eba-wrapper.eba-txt-wrap a.eba-txt__btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 16px !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease !important;
    text-decoration: none !important;
    line-height: 1 !important;
    text-transform: none !important;
    box-shadow: none !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__btn svg { flex-shrink: 0; }

.eba-wrapper.eba-txt-wrap .eba-txt__btn--copy,
.eba-wrapper.eba-txt-wrap button.eba-txt__btn--copy {
    background: #0f1c2e !important;
    background-image: none !important;
    color: #f7f4ed !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__btn--copy:hover { background: #1a2942 !important; transform: translateY(-1px); }
.eba-wrapper.eba-txt-wrap .eba-txt__btn--copy.is-copied {
    background: #7aa08c !important;
    color: #ffffff !important;
}

.eba-wrapper.eba-txt-wrap .eba-txt__btn--edit,
.eba-wrapper.eba-txt-wrap button.eba-txt__btn--edit {
    background: transparent !important;
    background-image: none !important;
    color: #4a5573 !important;
    padding: 9px 14px !important;
    font-weight: 500 !important;
    border: 1px solid rgba(15,28,46,0.15) !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__btn--edit:hover {
    color: #c99a54 !important;
    border-color: #c99a54 !important;
    background: transparent !important;
}

.eba-wrapper.eba-txt-wrap .eba-txt__btn--ghost,
.eba-wrapper.eba-txt-wrap button.eba-txt__btn--ghost {
    background: transparent !important;
    background-image: none !important;
    border: 1px solid rgba(15,28,46,0.15) !important;
    color: #4a5573 !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__btn--ghost:hover {
    border-color: #c99a54 !important;
    color: #0f1c2e !important;
}

.eba-wrapper.eba-txt-wrap .eba-txt__btn--cta,
.eba-wrapper.eba-txt-wrap a.eba-txt__btn--cta {
    background: #c99a54 !important;
    background-image: none !important;
    color: #0f1c2e !important;
    padding: 14px 28px !important;
    font-size: 14px !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__btn--cta:hover {
    background: #d9b579 !important;
    transform: translateY(-1px);
}

/* Load More button */
.eba-wrapper.eba-txt-wrap .eba-txt__loadmore {
    display: flex; justify-content: center;
    margin-top: 32px;
}
.eba-wrapper.eba-txt-wrap .eba-txt__loadmore-btn,
.eba-wrapper.eba-txt-wrap button.eba-txt__loadmore-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 32px !important;
    background: transparent !important;
    background-image: none !important;
    border: 1.5px solid #0f1c2e !important;
    border-radius: 999px !important;
    color: #0f1c2e !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}
.eba-wrapper.eba-txt-wrap .eba-txt__loadmore-btn:hover {
    background: #0f1c2e !important;
    color: #f7f4ed !important;
    transform: translateY(-1px);
}
.eba-wrapper.eba-txt-wrap .eba-txt__loadmore.is-empty { display: none; }

/* ==================== GATE (locked preview) ==================== */
.eba-txt__gate {
    margin-top: 40px;
    text-align: center;
}
.eba-txt__gate-panel {
    display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
    background: #ffffff;
    border: 1px dashed rgba(201, 154, 84, 0.45);
    border-radius: 20px;
    padding: 32px 40px;
    max-width: 480px;
    color: #c99a54;
}
.eba-txt__gate-note {
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-size: 18px !important;
    line-height: 1.5 !important;
    color: #0f1c2e !important;
    margin: 4px 0 8px !important;
}
.eba-txt__signin {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    margin-top: 4px;
}
.eba-txt__signin:hover { color: #c99a54; }

/* ==================== MODAL ==================== */
.eba-txt__modal {
    position: fixed; inset: 0;
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.eba-txt__modal[hidden] { display: none; }
.eba-txt__modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 28, 46, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.eba-txt__modal-panel {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px; width: 100%;
    padding: 24px;
    box-shadow: 0 40px 80px -30px rgba(15,28,46,0.4);
    display: flex; flex-direction: column; gap: 16px;
}
.eba-txt__modal-panel header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15,28,46,0.08);
}
.eba-txt__modal-panel h3 {
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #0f1c2e !important;
    margin: 0 !important;
}
.eba-txt__modal-x {
    background: transparent; border: 0; cursor: pointer;
    color: #64748b;
    padding: 6px; border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}
.eba-txt__modal-x:hover { background: rgba(15,28,46,0.05); color: #0f1c2e; }
.eba-txt__modal-panel textarea {
    width: 100%;
    min-height: 140px;
    padding: 14px 16px;
    border: 1px solid rgba(15,28,46,0.12);
    border-radius: 12px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 17px;
    line-height: 1.55;
    color: #0f1c2e;
    background: #fbf8f0;
    resize: vertical;
    transition: border-color 0.15s ease;
}
.eba-txt__modal-panel textarea:focus {
    outline: none;
    border-color: #c99a54;
    background: #ffffff;
}
.eba-txt__modal-panel footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding-top: 10px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
    .eba-txt__container { padding: 0 16px; }
    .eba-txt__grid { grid-template-columns: 1fr; }
    .eba-txt__card { padding: 20px; }
    .eba-txt__card-text { font-size: 17px !important; }
    .eba-txt__filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
    .eba-txt__chip { flex-shrink: 0; }
    .eba-txt__gate-panel { padding: 24px 22px; }
}
