/* Main Variables - Gold & Black Theme */
:root {
    --sa-gold: #D4AF37;
    --sa-gold-h: #F4CF57;
    --sa-black: #111;
    --sa-dark: #1a1a1a;
    --sa-gray: #f5f5f5;
    --sa-text: #333;
    --sa-text-w: #fff;
}

/* Base Form Styling */
.suba-ai-wrapper {
    background: #fff;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--sa-black);
    position: relative;
    overflow-x: hidden;
}

/* Header / Hero */
.ai-hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: var(--sa-text-w);
    padding: 80px 40px;
    position: relative;
    border-bottom: 4px solid var(--sa-gold);
    overflow: hidden;
}

.ai-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

.ai-hero h1 {
    font-weight: 800;
    font-size: 3.5rem;
    margin: 15px 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.ai-hero p {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

.ai-hero .sa-text-outline {
    -webkit-text-stroke: 2px var(--sa-gold);
    color: transparent;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.ai-sub {
    color: var(--sa-gold);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 3px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Input Section */
.ai-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.suba-input-group {
    background: #fff;
    border: 2px solid transparent;
    border-left: 4px solid var(--sa-gold);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    position: relative;
    transition: all 0.3s ease;
}

.suba-input-group:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.suba-input-group h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--sa-black);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.suba-input-group h3 i {
    color: var(--sa-gold);
    font-size: 1.1rem;
}

.suba-field {
    margin-bottom: 20px;
}

.suba-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--sa-dark);
}

.suba-field input[type="text"],
.suba-field input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    background: #fafafa;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suba-field input:hover {
    border-color: #d4d4d4;
    background: #fff;
}

.suba-field input:focus {
    border-color: var(--sa-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.sa-btn-gold {
    background: linear-gradient(135deg, #D4AF37 0%, #F4CF57 50%, #C9A428 100%);
    color: #000;
    border: none;
    padding: 16px 35px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.sa-btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.sa-btn-gold:hover::before {
    left: 100%;
}

.sa-btn-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.5);
}

.sa-btn-gold:active {
    transform: translateY(-1px) scale(0.98);
}

.sa-btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sa-btn-gold:disabled:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

/* Roadmap / Progress Styles */
.ai-roadmap {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.ai-roadmap::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #eee;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 30%;
    opacity: 0.5;
    transition: all 0.5s;
}

.step.active,
.step.completed {
    opacity: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #ddd;
    color: #ccc;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.5s;
}

.step.active .step-icon {
    border-color: var(--sa-gold);
    color: var(--sa-gold);
    background: #fff;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.step.completed .step-icon {
    background: var(--sa-gold);
    border-color: var(--sa-gold);
    color: #fff;
}

.step h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.step p {
    margin: 5px 0 0;
    font-size: 0.75rem;
    color: #888;
}

/* Result Area */
.ai-result {
    display: none;
    /* Hidden by default */
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-top: 5px solid var(--sa-gold);
    padding: 50px 40px;
    box-shadow: 0 -5px 40px rgba(0, 0, 0, 0.08);
    position: relative;
}

.ai-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--sa-gold) 0%,
            #F4CF57 50%,
            var(--sa-gold) 100%);
}

.ai-article-content {
    line-height: 1.8;
    color: #444;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.ai-article-content h1,
.ai-article-content h2,
.ai-article-content h3 {
    color: var(--sa-black);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.ai-article-content h2 {
    border-left: 4px solid var(--sa-gold);
    padding-left: 15px;
}

.ai-article-content p {
    margin-bottom: 1.2em;
}

/* Animations included from original project */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 2s linear infinite;
}

/* Markdown styling fixes */
.ai-article-content ul,
.ai-article-content ol {
    margin-bottom: 1.2em;
    padding-left: 1.5em;
}

.ai-article-content li {
    margin-bottom: 0.5em;
}

/* Publish Actions (Inspired by Suba Documents Grid) */
.publish-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    padding: 0;
}

.publish-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    border-left: 5px solid var(--sa-gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.publish-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.publish-box:hover::before {
    opacity: 1;
}

.publish-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(212, 175, 55, 0.15);
    border-left-width: 6px;
}

.publish-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4CF57 100%);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s;
}

.publish-box:hover .publish-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.publish-text h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--sa-black);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.publish-text p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #777;
    line-height: 1.5;
}

.schedule-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.schedule-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.schedule-input:focus {
    border-color: var(--sa-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* ============================================ */
/* PREMIUM TOAST NOTIFICATIONS */
/* ============================================ */
.suba-toast {
    position: fixed;
    top: 30px;
    right: -400px;
    width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 15px;
    padding: 20px;
    z-index: 999999;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid var(--sa-gold);
}

.suba-toast.show {
    right: 30px;
}

.suba-toast-success {
    border-left-color: #10b981;
}

.suba-toast-error {
    border-left-color: #ef4444;
}

.toast-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.suba-toast-success .toast-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.suba-toast-error .toast-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.toast-content {
    flex: 1;
}

.toast-content h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sa-black);
}

.toast-content p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.toast-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sa-gold);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.toast-link:hover {
    color: var(--sa-gold-h);
    gap: 8px;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f5f5f5;
    color: var(--sa-black);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .suba-toast {
        width: calc(100% - 40px);
        right: -100%;
    }

    .suba-toast.show {
        right: 20px;
    }
}

/* ============================================ */
/* PREMIUM ARTICLE STYLING (GENERATED CONTENT)  */
/* ============================================ */
.suba-premium-article {
    background: transparent;
}

.suba-featured-intro {
    background: linear-gradient(135deg, var(--sa-gold) 0%, #F4CF57 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    color: #000;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.8;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    border-left: 6px solid #000;
}

.suba-section-card {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.suba-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.suba-section-card h2 {
    color: var(--sa-black);
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--sa-gold);
    display: inline-block;
}

.suba-section-card h3 {
    color: var(--sa-dark);
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

.suba-image-placeholder {
    width: 100%;
    background: #fafafa;
    border: 3px dashed #ddd;
    /* Default dashed */
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    /* Default: Hidden on Frontend */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Force show in Admin/Editor/Plugin Page */
.wp-admin .suba-image-placeholder,
.suba-ai-wrapper .suba-image-placeholder,
.block-editor-block-list__layout .suba-image-placeholder,
body.mce-content-body .suba-image-placeholder,
.suba-image-placeholder.force-visible {
    display: flex !important;
}

.suba-image-placeholder:hover {
    border-color: var(--sa-gold);
    background: rgba(212, 175, 55, 0.05);
    transform: scale(0.99);
}

.suba-image-placeholder i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.suba-image-placeholder:hover i {
    color: var(--sa-gold);
}

.suba-image-placeholder p {
    font-weight: 700;
    color: var(--sa-dark);
    margin: 0;
    font-size: 1.1rem;
}

.suba-image-placeholder small {
    color: #888;
    font-size: 0.9rem;
}

/* Specific styling for the generated HTML lists */
.suba-section-card ul,
.suba-section-card ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.suba-section-card li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 5px;
}

.suba-section-card p {
    margin-bottom: 1.5rem;
    color: #444;
}

/* ============================================ */
/* FRONTEND PREMIUM STYLES (THEME OVERRIDES)    */
/* ============================================ */

/* Wrapper to isolate styles */
.suba-article-premium {
    background: transparent !important;
    /* Transparent to blend with theme */
    color: #f5f5f5 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    padding: 0 !important;
    /* No padding, let theme handle it */
    width: 100% !important;
    max-width: 100% !important;
    line-height: 1.8 !important;
}

/* Premium Typography for Article */
.suba-article-premium p {
    color: #cccccc !important;
    font-size: 1.15rem !important;
    /* Slightly larger for readability */
    margin-bottom: 1.8em !important;
    line-height: 1.9 !important;
}

.suba-article-premium strong {
    color: #fff !important;
    font-weight: 700;
}

/* Headings with Gold Accent */
/* Headings with Gold Accent */
.suba-article-premium h2 {
    color: #ffffff !important;
    font-size: 2.5rem !important;
    /* Bigger headings */
    font-weight: 800 !important;
    margin-top: 60px !important;
    margin-bottom: 25px !important;
    position: relative;
    padding-left: 0;
    border-left: none !important;
    line-height: 1.2 !important;
    scroll-margin-top: 100px !important;
    /* Fix for sticky header */
}

/* Force Style for Main Title (Theme Override) */
h1.entry-title,
.entry-title h1,
h1 {
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

/* Outline text effect for H2 */
.suba-article-premium h2::after {
    content: '' !important;
    display: block !important;
    width: 80px !important;
    height: 4px !important;
    background: #D4AF37 !important;
    /* Gold */
    margin-top: 15px !important;
}

/* Disable before to remove double lines if any */
.suba-article-premium h2::before {
    display: none !important;
}

.suba-article-premium h3 {
    color: #D4AF37 !important;
    /* Gold Text */
    font-size: 1.6rem !important;
    margin-top: 40px !important;
    margin-bottom: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================ */
/* FAQ ACCORDION STYLING - PREMIUM DARK         */
/* ============================================ */
.suba-faq-container {
    margin-top: 30px;
    margin-bottom: 50px;
}

.suba-faq-item {
    background: #1a1a1a;
    border-left: 3px solid var(--sa-gold);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.suba-faq-item[open] {
    background: #222;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.suba-faq-question {
    list-style: none;
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    background: transparent;
    transition: color 0.3s;
}

.suba-faq-question::-webkit-details-marker {
    display: none;
}

.suba-faq-question:hover {
    color: var(--sa-gold);
    background: rgba(255, 255, 255, 0.02);
}

.suba-faq-title {
    flex: 1;
    padding-right: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.suba-faq-icon {
    color: var(--sa-gold);
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.suba-faq-item[open] .suba-faq-icon {
    transform: rotate(180deg);
}

.suba-faq-answer {
    padding: 5px 25px 25px;
    color: #ccc;
    font-size: 1rem;
    line-height: 1.7;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.suba-faq-answer p {
    margin-bottom: 0;
    color: #ccc !important;
}



/* Premium Blockquotes (Fixing the > issue) */
.suba-article-premium blockquote {
    background: transparent !important;
    border-left: 4px solid #D4AF37 !important;
    margin: 40px 0 !important;
    padding: 10px 0 10px 30px !important;
    /* Indent text */
    font-size: 1.35rem !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    font-style: italic !important;
    color: #fff !important;
    /* Brighter quote text */
    border-radius: 0 !important;
}

/* Ensure paragraphs inside quotes don't have extra margins */
.suba-article-premium blockquote p {
    margin-bottom: 0 !important;
    color: #fff !important;
}

/* Lists */
.suba-article-premium ul,
.suba-article-premium ol {
    margin: 30px 0 40px 0 !important;
    padding-left: 20px !important;
}

.suba-article-premium li {
    margin-bottom: 15px !important;
    color: #ddd !important;
    font-size: 1.15rem !important;
    position: relative;
    list-style-type: none !important;
    /* We use custom markers */
}

/* Custom Gold Arrow Marker */
.suba-article-premium ul li::before {
    content: '❯' !important;
    color: #D4AF37 !important;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    /* Space for marker */
    margin-left: -1.5em;
    /* Pull back */
}

/* Reset standard marker */
.suba-article-premium ul li::marker {
    content: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .suba-article-premium h2 {
        font-size: 2rem !important;
    }
}

/* ============================================ */
/* TABLE OF CONTENTS STYLES                     */
/* ============================================ */
.suba-toc-container {
    background: rgba(255, 255, 255, 0.03) !important;
    /* Very subtle background */
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    /* Faint gold border */
    border-radius: 8px !important;
    padding: 25px !important;
    margin: 40px 0 50px 0 !important;
}

.suba-toc-title {
    color: #D4AF37 !important;
    /* Gold */
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    margin-bottom: 15px !important;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 10px;
    display: inline-block;
}

.suba-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.suba-toc-list li {
    margin-bottom: 10px !important;
    padding-left: 0 !important;
}

/* Remove gold arrow from TOC items */
.suba-toc-list li::before {
    content: none !important;
}

.suba-toc-list li a {
    color: #cccccc !important;
    text-decoration: none !important;
    font-size: 1.05rem !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.suba-toc-list li a:hover {
    color: #D4AF37 !important;
    padding-left: 5px;
    border-bottom: 1px solid #D4AF37;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}