/**
 * ============================================
 * Copyright 2026 DM Atcheh
 * Server/Aplikasi SelfBooth ShiroStudio
 * ============================================
 * DMFaq.css - Stylesheet Pusat Bantuan & FAQ (ShiroStudio Theme)
 */

/* ── Wrapper & Layout ──────────────────────────────── */
.dm-faq-page-wrap {
    padding: 120px 0 80px;
    min-height: 80vh;
}

@media (max-width: 768px) {
    .dm-faq-page-wrap {
        padding: 95px 0 60px;
    }
}

.dm-faq-hero {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 2.5rem;
}

.dm-faq-hero-badge {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 900;
    margin-bottom: 1rem;
    border-radius: 4px;
    letter-spacing: 0.06em;
    background: #00b4d8;
    color: #050a12 !important;
    border: 2px solid #050a12;
    box-shadow: 3px 3px 0px #38bdf8;
    text-transform: uppercase;
}

.dm-faq-hero-title {
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    color: var(--dm-text-primary);
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.dm-faq-hero-sub {
    font-size: 1.05rem;
    color: var(--dm-text-secondary);
    line-height: 1.65;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Search Bar Card ──────────────────────────────── */
.dm-faq-search-card {
    max-width: 760px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.dm-faq-search-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.35rem 1.15rem;
    background: var(--dm-bg-card);
    border: 2px solid rgba(0, 180, 216, 0.3);
    border-radius: 6px;
    box-shadow: 4px 4px 0px rgba(0, 180, 216, 0.15);
    transition: all 0.2s ease;
}

.dm-faq-search-box:focus-within {
    border-color: #00b4d8;
    box-shadow: 4px 4px 0px #38bdf8;
    transform: translate(-1px, -1px);
}

.dm-faq-search-icon {
    display: flex;
    align-items: center;
    color: #00b4d8;
    flex-shrink: 0;
}

.dm-faq-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dm-text-primary);
    outline: none;
    font-family: var(--dm-font-sans);
}

.dm-faq-search-input::placeholder {
    color: var(--dm-text-muted);
    font-weight: 500;
}

.dm-faq-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--dm-border);
    border-radius: 4px;
    cursor: pointer;
    background: var(--dm-bg-input);
    color: var(--dm-text-secondary);
    transition: all 0.15s ease;
}

.dm-faq-search-clear:hover {
    background: #00b4d8;
    color: #050a12;
    border-color: #00b4d8;
}

/* ── Autocomplete Dropdown ────────────────────────── */
.dm-faq-autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    border-radius: 6px;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    background: var(--dm-bg-card);
    border: 2px solid #00b4d8;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.4);
    display: none;
}

.dm-faq-autocomplete.active {
    display: block;
    animation: dmFaqFadeIn 0.2s ease-out;
}

.dm-faq-ac-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 12px 1.25rem;
    font-size: 0.92rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--dm-text-secondary);
    border-bottom: 1px solid var(--dm-border-light, rgba(0, 180, 216, 0.08));
    transition: all 0.15s ease;
    font-family: var(--dm-font-sans);
}

.dm-faq-ac-item:hover,
.dm-faq-ac-item:focus {
    background: var(--dm-bg-input);
    color: #38bdf8;
    padding-left: 1.5rem;
}

.dm-faq-ac-item svg {
    flex-shrink: 0;
    color: #00b4d8;
}

.dm-faq-ac-item:last-child {
    border-bottom: none;
}

/* ── Filter Nav Pills ────────────────────────────── */
.dm-faq-filter-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    max-width: 900px;
    margin: 0 auto 1.75rem;
}

.dm-faq-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    font-family: var(--dm-font-sans);
    border-radius: 4px;
    border: 2px solid var(--dm-border);
    background: var(--dm-bg-card);
    color: var(--dm-text-secondary);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 3px 3px 0px rgba(0, 180, 216, 0.15);
}

.dm-faq-filter-btn:hover {
    border-color: #00b4d8;
    color: #38bdf8;
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px #00b4d8;
}

.dm-faq-filter-btn.active {
    background: #00b4d8 !important;
    border-color: #050a12 !important;
    color: #050a12 !important;
    font-weight: 900;
    box-shadow: 3px 3px 0px #38bdf8;
    transform: translate(2px, 2px);
}

.dm-faq-filter-btn.active svg {
    color: #050a12;
}

/* ── Quick Controls Bar ──────────────────────────── */
.dm-faq-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 760px;
    margin: 0 auto 1.25rem;
    padding: 0 0.25rem;
}

.dm-faq-stats-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dm-text-muted);
}

.dm-faq-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dm-faq-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 4px;
    background: var(--dm-bg-input);
    border: 1.5px solid var(--dm-border);
    color: var(--dm-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--dm-font-sans);
}

.dm-faq-action-btn:hover {
    background: var(--dm-bg-card);
    border-color: #00b4d8;
    color: #38bdf8;
    transform: translateY(-1px);
}

/* ── FAQ Blocks & Items ───────────────────────────── */
.dm-faq-sections {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.dm-faq-block-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0, 180, 216, 0.25);
}

.dm-faq-block-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    background: #00b4d8;
    color: #050a12;
    border: 2px solid #050a12;
    box-shadow: 2px 2px 0px #38bdf8;
    flex-shrink: 0;
}

.dm-faq-block-icon svg {
    width: 20px;
    height: 20px;
}

.dm-faq-block-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--dm-text-primary);
    margin: 0;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.dm-faq-badge {
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--dm-bg-input);
    color: #38bdf8;
    border: 1.5px solid var(--dm-border);
}

.dm-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dm-faq-item {
    background: var(--dm-bg-card);
    border: 2px solid rgba(0, 180, 216, 0.25);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px rgba(0, 180, 216, 0.12);
}

.dm-faq-item:hover {
    border-color: #00b4d8;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.18);
}

.dm-faq-item.dm-faq-open {
    border-color: #00b4d8;
    box-shadow: 4px 4px 0px rgba(0, 180, 216, 0.35);
}

.dm-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    color: var(--dm-text-primary);
    font-family: var(--dm-font-sans);
    transition: color 0.15s ease;
}

.dm-faq-q-text {
    flex: 1;
    line-height: 1.45;
}

.dm-faq-q:hover .dm-faq-q-text {
    color: #38bdf8;
}

.dm-faq-q-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--dm-bg-input);
    border: 1.5px solid var(--dm-border);
    color: #00b4d8;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.dm-faq-item.dm-faq-open .dm-faq-q-icon-wrap {
    background: #00b4d8;
    border-color: #050a12;
    color: #050a12;
}

.dm-faq-q-chevron {
    display: flex;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm-faq-q-chevron svg {
    width: 16px;
    height: 16px;
}

.dm-faq-item.dm-faq-open .dm-faq-q-chevron {
    transform: rotate(180deg);
}

/* ── Answer Accordion Body ────────────────────────── */
.dm-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm-faq-item.dm-faq-open .dm-faq-a {
    max-height: 800px;
}

.dm-faq-a-inner {
    padding: 0 1.25rem 1.25rem;
}

.dm-faq-a-content {
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--dm-text-secondary);
    padding-top: 0.85rem;
    border-top: 1.5px dashed var(--dm-border);
}

.dm-faq-a-content strong {
    color: var(--dm-text-primary);
    font-weight: 800;
}

.dm-faq-inline-link {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    color: #00b4d8;
    margin-top: 0.35rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.dm-faq-inline-link:hover {
    color: #38bdf8;
}

.dm-faq-a-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.85rem;
    padding-top: 0.6rem;
}

.dm-faq-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    background: transparent;
    border: 1.5px solid var(--dm-border);
    color: var(--dm-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--dm-font-sans);
    text-transform: uppercase;
}

.dm-faq-copy-btn:hover {
    background: var(--dm-bg-input);
    color: #00b4d8;
    border-color: #00b4d8;
}

/* ── No Results State ─────────────────────────────── */
.dm-faq-no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--dm-bg-card);
    border: 2px dashed rgba(0, 180, 216, 0.3);
    border-radius: 6px;
    max-width: 600px;
    margin: 2rem auto;
}

.dm-faq-no-icon {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: #00b4d8;
    color: #050a12;
    border: 2px solid #050a12;
    box-shadow: 3px 3px 0px #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.dm-faq-no-icon svg {
    width: 28px;
    height: 28px;
}

.dm-faq-no-results h3 {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--dm-text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.dm-faq-no-results p {
    font-size: 0.95rem;
    color: var(--dm-text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* ── CTA Box ──────────────────────────────────────── */
.dm-faq-cta-box {
    max-width: 760px;
    margin: 3.5rem auto 0;
    padding: 2.75rem 2rem;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(0, 180, 216, 0.12) 0%, rgba(9, 17, 30, 0.95) 100%);
    border: 2px solid #00b4d8;
    box-shadow: 6px 6px 0px rgba(0, 180, 216, 0.35);
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.dm-theme-light .dm-faq-cta-box {
    background: linear-gradient(180deg, rgba(0, 180, 216, 0.12) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.dm-faq-cta-icon-badge {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dm-faq-cta-content h3 {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--dm-text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.dm-faq-cta-content p {
    font-size: 0.98rem;
    color: var(--dm-text-secondary);
    line-height: 1.6;
    max-width: 580px;
    margin: 0 auto 1.5rem;
}

.dm-faq-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* ── Animation & Utilities ────────────────────────── */
@keyframes dmFaqFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dm-faq-item.dm-faq-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .dm-faq-hero-title {
        font-size: 1.75rem;
    }
    .dm-faq-controls {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    .dm-faq-filter-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }
    .dm-faq-filter-btn {
        white-space: nowrap;
    }
    .dm-faq-cta-box {
        padding: 2rem 1.25rem;
    }
}
