/**
 * assets/css/igaming-studio.css
 * iGaming SEO Content Studio - Impeccable Dark Obsidian Design System v3.0
 * Pure Text SEO Studio (Strictly Zero Image Generation)
 */

/* =========================================================================
   1. 2-COLUMN RESPONSIVE LAYOUT
   ========================================================================= */
.igaming-studio-container {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 20px;
    margin-bottom: 48px;
}

@media (max-width: 1080px) {
    .igaming-studio-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.igaming-card {
    background: var(--bg-card, #131c2e);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    position: relative;
    backdrop-filter: blur(10px);
}

.igaming-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.igaming-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.igaming-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #0ea5e9), #0284c7);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.igaming-form-group {
    margin-bottom: 18px;
}

.igaming-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main, #f8fafc);
    margin-bottom: 8px;
}

.igaming-label .hint {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 400;
    margin-left: 6px;
}

.igaming-select,
.igaming-input,
.igaming-textarea {
    width: 100%;
    background: var(--bg-elevated, #0b1120);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.18));
    border-radius: var(--radius, 8px);
    padding: 10px 14px;
    color: var(--text-main, #f8fafc);
    font-size: 0.9rem;
    font-family: var(--font-sans, 'Be Vietnam Pro', sans-serif);
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.igaming-select:focus,
.igaming-input:focus,
.igaming-textarea:focus {
    border-color: var(--primary, #0ea5e9);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.igaming-byok-box {
    background: rgba(14, 165, 233, 0.04);
    border: 1px dashed rgba(56, 189, 248, 0.3);
    border-radius: var(--radius, 8px);
    padding: 14px 16px;
    margin-bottom: 18px;
}

/* =========================================================================
   2. PROGRESS STEPPER (GLOWING PULSE & COMPLETED STATES)
   ========================================================================= */
.igaming-stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px;
    background: var(--bg-elevated, #0b1120);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    border-radius: var(--radius, 8px);
}

.igaming-stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    opacity: 0.45;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.igaming-stepper-item.active {
    opacity: 1;
}

.igaming-stepper-item.completed {
    opacity: 0.95;
}

.igaming-stepper-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-card, #131c2e);
    border: 2px solid var(--border, rgba(148, 163, 184, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 6px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    transition: all 0.25s ease;
}

.igaming-stepper-item.active .igaming-stepper-circle {
    background: var(--primary, #0ea5e9);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.65);
    animation: igaming-pulse 1.8s infinite ease-in-out;
}

.igaming-stepper-item.completed .igaming-stepper-circle {
    background: var(--success, #10b981);
    border-color: #34d399;
    color: #fff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.igaming-stepper-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    line-height: 1.25;
}

.igaming-stepper-item.active .igaming-stepper-label {
    color: var(--primary, #0ea5e9);
    font-weight: 700;
}

.igaming-stepper-item.completed .igaming-stepper-label {
    color: var(--success, #10b981);
}

@keyframes igaming-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
        transform: scale(1.05);
    }
}

/* =========================================================================
   3. RESULTS PREVIEW & FORMATTED CONTENT
   ========================================================================= */
.igaming-results-box {
    background: var(--bg-card, #131c2e);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.igaming-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
    background: var(--bg-elevated, #0b1120);
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.igaming-results-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    padding: 8px 18px;
    background: rgba(15, 22, 36, 0.65);
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.igaming-results-preview {
    background: var(--bg-elevated, #0b1120);
    padding: 28px;
    min-height: 480px;
    max-height: 720px;
    overflow-y: auto;
    font-family: var(--font-sans, 'Be Vietnam Pro', sans-serif);
    line-height: 1.75;
    color: var(--text-main, #f8fafc);
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.igaming-results-preview::-webkit-scrollbar {
    width: 6px;
}

.igaming-results-preview::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 4px;
}

.igaming-results-preview.placeholder-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    padding: 48px 24px;
}

.igaming-results-preview h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main, #f8fafc);
    margin-top: 0;
    margin-bottom: 18px;
    line-height: 1.35;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding-bottom: 12px;
}

.igaming-results-preview h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary, #0ea5e9);
    margin-top: 24px;
    margin-bottom: 12px;
    line-height: 1.35;
}

.igaming-results-preview h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-top: 18px;
    margin-bottom: 8px;
}

.igaming-results-preview p {
    margin-top: 0;
    margin-bottom: 14px;
}

.igaming-results-preview ul,
.igaming-results-preview ol {
    margin-top: 0;
    margin-bottom: 14px;
    padding-left: 24px;
}

.igaming-results-preview li {
    margin-bottom: 6px;
}

/* =========================================================================
   4. STYLED BLOCKQUOTES & SUMMARY BOXES
   ========================================================================= */
.igaming-results-preview blockquote,
.igaming-preview blockquote {
    border-left: 3px solid #6366f1;
    background: rgba(99, 102, 241, 0.08);
    padding: 16px 20px;
    margin: 18px 0;
    border-radius: 0 var(--radius, 8px) var(--radius, 8px) 0;
    font-style: italic;
    color: #e0e7ff;
    line-height: 1.65;
}

.igaming-results-preview blockquote p,
.igaming-results-preview blockquote ul,
.igaming-results-preview blockquote li {
    font-style: normal;
}

.igaming-results-preview blockquote p {
    margin-bottom: 8px;
}

.igaming-results-preview blockquote p:last-child,
.igaming-results-preview blockquote ul:last-child {
    margin-bottom: 0;
}

/* =========================================================================
   5. STYLED TABLES (IGAMING TABLE WRAPPER)
   ========================================================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 18px 0;
    border-radius: var(--radius, 8px);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.igaming-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
    background: var(--bg-elevated, #0b1120);
}

.igaming-table th {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-main, #f8fafc);
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.2));
    white-space: nowrap;
}

.igaming-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
}

.igaming-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.45);
}

.igaming-table tbody tr:hover {
    background: rgba(14, 165, 233, 0.08);
}

/* =========================================================================
   6. 1-CLICK ACTION BAR & COPY BUTTONS
   ========================================================================= */
.igaming-copy-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================================================================
   7. TOAST NOTIFICATIONS
   ========================================================================= */
.igaming-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.igaming-toast {
    background: var(--bg-card, #131c2e);
    border: 1px solid rgba(14, 165, 233, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    border-radius: var(--radius, 8px);
    padding: 12px 18px;
    font-size: 0.88rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: igaming-toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.igaming-toast.toast-exit {
    opacity: 0;
    transform: translateY(10px);
}

.igaming-toast.toast-success {
    border-color: rgba(16, 185, 129, 0.5);
}

.igaming-toast.toast-error {
    border-color: rgba(239, 68, 68, 0.5);
}

@keyframes igaming-toast-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   8. HISTORY DRAWER & MODAL STYLING (DARK OBSIDIAN BACKDROP BLUR)
   ========================================================================= */
.igaming-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.igaming-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 92vw;
    background: var(--bg-card, #131c2e);
    border-left: 1px solid var(--border, rgba(148, 163, 184, 0.2));
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.65);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.igaming-drawer.open {
    transform: translateX(0);
}

.igaming-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    background: var(--bg-elevated, #0b1120);
}

.igaming-drawer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary, #0ea5e9);
}

.igaming-drawer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    margin: 0;
}

.igaming-drawer-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
}

.igaming-drawer-close {
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.igaming-drawer-close:hover {
    color: var(--text-main, #f8fafc);
    background: rgba(255, 255, 255, 0.08);
}

.igaming-drawer-toolbar {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.igaming-search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.igaming-search-box svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted, #94a3b8);
    pointer-events: none;
}

.igaming-search-input {
    width: 100%;
    background: var(--bg-elevated, #0b1120);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.18));
    border-radius: var(--radius, 8px);
    padding: 8px 30px 8px 34px;
    color: var(--text-main, #f8fafc);
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
}

.igaming-search-input:focus {
    border-color: var(--primary, #0ea5e9);
}

.igaming-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 6px;
}

.igaming-filter-select {
    width: 150px;
    background: var(--bg-elevated, #0b1120);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.18));
    border-radius: var(--radius, 8px);
    padding: 8px 10px;
    color: var(--text-main, #f8fafc);
    font-size: 0.82rem;
    outline: none;
}

.igaming-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.igaming-history-item {
    background: var(--bg-elevated, #0b1120);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    border-radius: var(--radius, 8px);
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.igaming-history-item:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.igaming-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.igaming-history-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}

.igaming-history-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 12px;
}

.igaming-meta-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted, #94a3b8);
}

.igaming-meta-badge.type-pillar {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.igaming-meta-badge.type-sports {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.igaming-meta-badge.type-lottery {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.igaming-meta-badge.type-guide {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.igaming-meta-badge.type-review {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

.igaming-meta-badge.type-seeding {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
}

.igaming-history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.igaming-drawer-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    background: var(--bg-elevated, #0b1120);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.igaming-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================================
   9. DETAIL VIEW MODAL
   ========================================================================= */
.igaming-modal {
    position: fixed;
    inset: 0;
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 8, 15, 0.85);
    backdrop-filter: blur(8px);
}

.igaming-modal-content {
    background: var(--bg-card, #131c2e);
    border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
    border-radius: var(--radius-lg, 12px);
    width: 900px;
    max-width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.igaming-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
    background: var(--bg-elevated, #0b1120);
}

.igaming-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    margin: 0 0 6px 0;
}

.igaming-modal-meta {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}

.igaming-modal-close {
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.igaming-modal-close:hover {
    color: #fff;
}

.igaming-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.igaming-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
