/* HORRORSCHOOL CORE STYLES */
body {
    background-color: #050505;
    color: #eeeeee;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    color-scheme: dark;
}

a {
    text-decoration: none;
}

/* Core Layout */
.studio-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.studio-sidebar {
    width: 280px;
    background-color: #0a0a0a;
    border-right: 1px solid #1a1a1a;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #111;
    box-sizing: border-box;
    z-index: 100;
}

.studio-sidebar::-webkit-scrollbar {
    width: 6px;
}

.studio-sidebar::-webkit-scrollbar-track {
    background: #111;
}

.studio-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.studio-sidebar::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

.studio-main {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    box-sizing: border-box;
    min-height: 100vh;
    position: relative;
}

.studio-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
    overflow-x: hidden;
}

/* Sidebar Elements */
.studio-sidebar ul,
.studio-sidebar li,
.studio-sidebar-widget {
    padding-left: 0 !important;
    margin-left: 0 !important;
    list-style: none !important;
}

.studio-logo img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
}

.credit-box {
    background: #111;
    border: 1px solid #1a1a1a;
    padding: 20px !important;
    border-radius: 12px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
    text-align: center;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

.credit-box h3 {
    margin: 0 !important;
    padding: 0 !important;
    color: #d32f2f;
    font-size: 24px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
}

.credit-box h3 .dashicons,
.credit-box h3 img,
.credit-box h3 svg {
    margin: 0 !important;
    padding: 0 !important;
}

.credit-box span {
    color: #555;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 10px 0 0 0 !important;
    padding: 0 !important;
    text-align: center;
    width: 100%;
    display: block;
}

.hs-blood-status-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
}

.get-more-blood-link {
    color: #ff0000 !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 1.1rem !important;
    margin: 15px 0 0 0 !important;
    text-decoration: none !important;
    width: auto !important;
    display: inline-block !important;
    transition: color 0.2s ease;
}

.get-more-blood-link:hover {
    color: #cc0000 !important;
}

.sidebar-section-label {
    color: #444;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 800;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.nav-list li {
    margin-bottom: 5px;
}

.nav-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    color: #888;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: #d32f2f;
    color: #ffffff;
}

/* Mobile Nav Override */
.bottom-nav {
    display: none;
}

#hs-mobile-menu-toggle {
    display: none;
}

.hs-mobile-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9998;
}

.hs-mobile-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    #hs-mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 10000 !important;
        background-color: #111 !important;
        color: #ff0000 !important;
        border: 1px solid #333 !important;
        border-radius: 4px !important;
        width: 45px !important;
        height: 45px !important;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    }

    .hs-sidebar {
        padding-top: 60px !important;
    }

    .studio-sidebar {
        display: flex !important;
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 9999 !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .studio-sidebar.is-open {
        transform: translateX(0);
    }

    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .studio-main,
    .studio-content-wrapper {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .pricing-card,
    .hs-content-block,
    .infusion-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .infusion-details {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 15px !important;
    }

    .infusion-text {
        text-align: center !important;
    }

    .pricing-card .pricing-btn,
    .pricing-card button {
        width: 100% !important;
        margin-top: 10px !important;
    }

    .prompt-flex {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 15px !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    .prompt-flex textarea,
    .prompt-flex input[type="text"] {
        width: 100% !important;
        min-height: 100px !important;
        font-size: 16px !important;
        box-sizing: border-box !important;
    }

    .prompt-flex .develop-button,
    .prompt-flex button[type="submit"] {
        width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
    }

    .prompt-options {
        width: 100% !important;
        justify-content: space-between !important;
        margin-top: 10px !important;
        box-sizing: border-box !important;
        padding: 0 15px !important;
    }

    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    span {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .studio-main {
        margin-left: 0;
        padding-top: 70px !important;
        padding-bottom: 20px !important;
    }

    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #0a0a0a;
        border-top: 1px solid #1a1a1a;
        z-index: 2000;
        padding: 15px 0 calc(15px + env(safe-area-inset-bottom));
    }

    .bottom-nav-list {
        display: flex;
        justify-content: space-around;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .bottom-nav-list a {
        color: #666;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10px;
        font-weight: 800;
        gap: 5px;
    }

    .bottom-nav-list a.active,
    .bottom-nav-list a:hover {
        color: #d32f2f;
    }
}

/* Canvas Areas */
.canvas-area {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#result-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.script-canvas {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    line-height: 1.8;
    color: #ccc;
    overflow-wrap: break-word;
}

.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    color: #555;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
    margin: 0;
}

.video-canvas {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#result-video {
    width: 100%;
    height: 100%;
    display: none;
}

/* Idle Viewport State */
.hs-viewport-idle {
    height: 450px !important;
    min-height: 450px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.3s ease, min-height 0.3s ease;
}

/* Grids */
.recent-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    margin-top: 15px !important;
    margin-bottom: 25px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 10px 5px 20px 5px !important;
    width: 100% !important;       /* THE FIX: Lock to exact width of the stage */
    max-width: 100% !important;   /* THE FIX: Hard cap */
    box-sizing: border-box !important;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
    -webkit-overflow-scrolling: touch;
}

/* Nightmare Engine: Video cards in horizontal strip */
.recent-grid.nightmare-grid .recent-item,
.recent-grid.nightmare-grid .nightmare-item {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
}

.recent-grid.nightmare-grid .masonry-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.recent-grid.nightmare-grid .masonry-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style the scrollbar to match the brand */
.recent-grid::-webkit-scrollbar {
    height: 4px;
}
.recent-grid::-webkit-scrollbar-track {
    background: transparent;
}
.recent-grid::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
.recent-grid::-webkit-scrollbar-thumb:hover {
    background: #c80000;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

/* Grid Items Overview */
.recent-item {
    position: relative;
    flex: 0 0 300px !important; /* Wider cards so all action icons fit on one row */
    min-height: 180px;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}

.recent-item:hover {
    border-color: #d32f2f;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

.dash-item {
    position: relative;
    aspect-ratio: 4/3;
    background: #000;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
}

.dash-item:hover {
    border-color: #d32f2f;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

.vault-item {
    position: relative;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.vault-item:hover {
    border-color: #d32f2f;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

/* Item Media */
.recent-item img,
.dash-item img,
.vault-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.3s;
}

.dash-item img {
    opacity: 0.7;
}

.recent-item:hover img,
.dash-item:hover img,
.vault-item:hover img {
    opacity: 1;
}

.recent-item video,
.vault-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: 0.3s;
}

.vault-item video {
    opacity: 0.8;
}

.recent-item:hover video,
.vault-item:hover video {
    opacity: 1;
}

/* Nightmare Engine Specific Overrides */
.recent-item.nightmare-item {
    aspect-ratio: 16/9;
}

/* Badges & Actions */
.item-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    display: flex;
    gap: 10px;
    transform: translateY(100%);
    transition: 0.3s;
    z-index: 10;
}

.recent-item:hover .item-actions,
.dash-item:hover .item-actions,
.vault-item:hover .item-actions {
    transform: translateY(0);
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    flex: 1;
    text-decoration: none;
    transition: 0.2s;
}

.vault-item .action-btn {
    border: none;
}

.action-btn:hover,
.action-btn.active {
    background: #d32f2f;
    border-color: #d32f2f;
}

.hs-heart-icon.is-active,
.hs-heart-icon.is-active .dashicons {
    color: #ff0000 !important;
}

/* Document/Script Previews */
.document-preview {
    padding: 20px;
    flex: 1;
    overflow: hidden;
    background: linear-gradient(to bottom, #111 40%, #0a0a0a 100%);
}

.doc-title {
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
}

.doc-snippet {
    color: #666;
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

.vault-item .doc-title {
    font-size: 15px;
    margin-bottom: 10px;
}

.vault-item .doc-snippet {
    font-size: 12px;
}

/* Prompts / Command Center */
.prompt-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(calc(-50% + 140px));
    width: calc(100% - 320px);
    max-width: 750px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
    z-index: 1000;
    transition: height 0.2s ease;
}

.prompt-flex {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#horror-prompt,
#script-prompt {
    flex: 1;
    background: transparent;
    color: #fff;
    border: none;
    padding: 12px 10px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 44px;
    max-height: 150px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

#horror-prompt::-webkit-scrollbar,
#script-prompt::-webkit-scrollbar {
    width: 6px;
}

#horror-prompt::-webkit-scrollbar-thumb,
#script-prompt::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

#generate-btn,
.develop-button,
.write-button,
.render-button {
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 0 20px;
    height: 44px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Prompt Options & Toggles */
.prompt-options {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.enhance-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.enhance-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #1a1a1a;
    border-radius: 24px;
    transition: 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #555;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked+.toggle-slider {
    background-color: #d32f2f;
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
    background-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.toggle-label {
    color: #888;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

input:checked~.toggle-label {
    color: #fff;
}

/* Utilities */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

#lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
}

.view-vault-link {
    display: inline-block;
    color: #d32f2f;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Studio Hero Dashboard */
.hero-block {
    background: linear-gradient(45deg, #111, #050505);
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 50px;
}

.hero-block h1 {
    font-size: 42px;
    margin: 0 0 10px;
    font-weight: 900;
    letter-spacing: -1px;
}

.hero-block p {
    color: #555;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
}

/* Vault specific */
.vault-header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.vault-stats {
    text-align: right;
    font-size: 11px;
    color: #444;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.vault-stats span#pinned-count {
    color: #eee;
    font-size: 13px;
}

.vault-tabs {
    display: flex;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.vault-tabs a {
    color: #444;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.vault-tabs a:hover {
    color: #eee;
}

.vault-tabs a.active {
    color: #eee;
    border-color: #d32f2f;
}

@media (max-width: 850px) {
    .studio-content-wrapper {
        padding-bottom: 240px !important;
    }

    .prompt-container {
        bottom: calc(85px + env(safe-area-inset-bottom));
        left: 15px;
        transform: none;
        width: calc(100% - 30px);
    }

    .script-canvas {
        padding: 20px;
    }
}

/* Transfusion Page */
.transfusion-header {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.blood-text {
    color: #d32f2f;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.pricing-card {
    background-color: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: #d32f2f;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.15);
}

.pricing-card.featured {
    border-color: #d60000;
    background-color: #1a0a0a;
    box-shadow: 0 0 25px rgba(214, 0, 0, 0.25);
}

.pricing-card.featured::before {
    content: "POPULAR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #d60000;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(214, 0, 0, 0.5);
}

.pricing-icon {
    font-size: 40px;
    color: #d32f2f;
    margin-bottom: 20px;
}

.pricing-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.pricing-card h3 {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 10px;
    color: #fff;
}

.pricing-amount {
    font-size: 18px;
    color: #d32f2f;
    font-weight: 800;
    margin-bottom: 20px;
}

.pricing-price {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 30px;
    color: #fff;
}

.pricing-btn {
    background: #d60000;
    border: 2px solid #d60000;
    color: #fff !important;
    padding: 12px 0;
    width: 100%;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.pricing-btn:hover {
    border-color: #b71c1c;
    background: #b71c1c;
}

.pricing-btn.featured-btn {
    background: #d60000;
    border-color: #d60000;
    color: #fff !important;
}

.pricing-btn.featured-btn:hover {
    background: #b71c1c;
    border-color: #b71c1c;
}

/* PMPro Confirmation Message Fixes */
.pmpro p,
.pmpro_section p,
#pmpro_confirmation-2 p,
.entry-content .pmpro p {
    color: #eeeeee !important;
}

/* Generative Tools Loader Overlay */
.hs-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.hs-loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hs-loader-text {
    color: #d60000;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse-blood 1.5s infinite;
}

@keyframes pulse-blood {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
        text-shadow: 0 0 10px rgba(214, 0, 0, 0.2);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
        text-shadow: 0 0 25px rgba(214, 0, 0, 0.8);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.95);
        text-shadow: 0 0 10px rgba(214, 0, 0, 0.2);
    }
}

/* Vault Loader Wrapper */
.vault-loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    text-align: center;
    column-span: all;
    white-space: nowrap;
}

/* Vault Masonry Grid */
.vault-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
    margin-top: 30px;
}

.masonry-item {
    width: 100%;
}

.masonry-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.masonry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: #555;
}

.masonry-media {
    position: relative;
    cursor: pointer;
    background: #000;
}

.masonry-media img,
.masonry-media video {
    width: 100%;
    height: auto;
    display: block;
}

.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(214, 0, 0, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.8;
}

.play-indicator .dashicons {
    color: #fff;
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

.script-media {
    padding: 30px 20px;
    text-align: center;
    background: #151515;
    border-bottom: 1px solid #222;
}

.script-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #d60000;
    margin-bottom: 15px;
}

.script-preview {
    color: #aaa;
    font-size: 13px;
    line-height: 1.5;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.masonry-meta {
    padding: 15px;
}

.masonry-prompt {
    font-size: 14px;
    font-weight: 700;
    color: #ddd;
    margin-bottom: 8px;
    line-height: 1.4;
}

.masonry-date {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.delete-vault-btn {
    /* Now a normal flex child inside .card-actions-overlay Ã¢â‚¬â€ no absolute positioning */
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0;
}

.delete-vault-btn:hover {
    color: #d60000;
}

.vault-empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #666;
    font-size: 16px;
    font-style: italic;
}

/* Vault Full Screen Modal */
.hs-vault-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
}

.hs-modal-content {
    background-color: #111;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #333;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.hs-modal-header {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hs-modal-meta {
    flex-grow: 1;
    padding-right: 20px;
}

.hs-modal-prompt {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.4;
}

.hs-modal-date {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hs-modal-close {
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.hs-modal-close:hover {
    color: #d60000;
}

.hs-modal-body {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #0a0a0a;
    border-radius: 0 0 8px 8px;
}

.hs-modal-body img,
.hs-modal-body video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.hs-modal-script-body {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    color: #ddd;
    line-height: 1.8;
    font-size: 16px;
    margin: 0 auto;
    max-height: 70vh;
    overflow-y: auto;
}

.hs-modal-script-body h3 {
    color: #fff;
    margin-top: 30px;
}

.hs-modal-script-body strong {
    color: #d60000;
}

/* Director's Dials */
.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 2px;
    /* Slight padding to account for the slider thumb width */
}

.slider-labels span {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    width: 33.33%;
    /* Divide into three equal zones */
}

/* Left label: Align text to the left */
.slider-labels span:first-child {
    text-align: left;
}

/* Middle label: Force text to be dead-center */
.slider-labels span:nth-child(2) {
    text-align: center;
    flex: 1;
    /* Allow the middle label to grow and stay centered */
}

/* Right label: Align text to the right */
.slider-labels span:last-child {
    text-align: right;
}

/* Add visual pipes to the middle label */
.slider-labels span:nth-child(2)::before {
    content: "| ";
    color: #444;
    margin-right: 4px;
}

.slider-labels span:nth-child(2)::after {
    content: " |";
    color: #444;
    margin-left: 4px;
}

.hs-other-input {
    width: 100%;
    background: #111;
    border: 1px solid #cc0000;
    /* Blood red border for custom fields */
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
}

.hs-dial-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: bold;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hs-dial-group select {
    width: 100%;
    padding: 10px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    outline: none;
}

.hs-dial-group select:focus {
    border-color: #cc0000;
}

.hs-dial-group input[type=range] {
    width: 100% !important;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    accent-color: #cc0000;
    margin-bottom: 5px;
}

/* Constrain the panel so it doesn't break the page layout */
.hs-directors-dials-panel {
    max-height: 60vh;
    /* Prevents it from growing taller than the screen */
    overflow-y: auto;
    overflow-x: hidden !important;
    /* Enables internal scrolling */
    scrollbar-width: thin;
    scrollbar-color: #cc0000 #161616;
}

.hs-config-panel {
    overflow-x: hidden !important;
}

/* Custom scrollbar for Webkit browsers */
.hs-directors-dials-panel::-webkit-scrollbar {
    width: 6px;
}

.hs-directors-dials-panel::-webkit-scrollbar-track {
    background: #161616;
}

.hs-directors-dials-panel::-webkit-scrollbar-thumb {
    background-color: #cc0000;
    border-radius: 10px;
}

.hs-file-input {
    background: #222;
    border: 1px solid #444;
    color: #ccc;
    padding: 8px;
    width: 100%;
    border-radius: 4px;
    box-sizing: border-box;
}

.hs-upload-dropzone {
    width: 100%;
    padding: 30px 10px;
    text-align: center;
    background: #111;
    border: 2px dashed #444;
    border-radius: 8px;
    cursor: pointer;
    color: #888;
    transition: border-color 0.3s;
}

.hs-upload-dropzone:hover {
    border-color: #cc0000;
    color: #ccc;
}

.hs-remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c80000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.hs-remove-image-btn:hover {
    background: #ff0000;
}

/* Ensure the preview container can anchor the absolute button */
#hs-image-preview {
    position: relative;
    display: inline-block;
}

#hs-nightmare-result-container video {
    object-fit: contain !important;
    background: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 8px;
}

/* The Switch Toggle */
.hs-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.hs-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hs-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 24px;
}

.hs-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.hs-switch input:checked+.hs-slider {
    background-color: #cc0000;
}

.hs-switch input:checked+.hs-slider:before {
    transform: translateX(20px);
}

.hs-edited-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: #2a2a2a;
    color: #999;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #444;
}

/* Script Editor Modal */
#hs-script-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hs-script-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.hs-script-modal-box {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
}

.hs-script-modal-header {
    padding: 15px 20px;
    border-bottom: none;
    background: #111;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.hs-script-tabs {
    display: flex;
    gap: 15px;
}

.hs-tab-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.hs-tab-btn.active {
    color: #fff;
    border-bottom-color: #d60000;
}

.hs-script-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #0a0a0a;
}

#hs-script-read-pane {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
}

#hs-script-edit-pane {
    font-family: 'Courier New', Courier, monospace;
    background: #111;
    color: #ccc;
    border: 1px solid #444;
    padding: 15px;
    box-sizing: border-box;
    width: 100%;
    min-height: 400px;
    font-size: 16px;
    resize: vertical;
}

.hs-script-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #333;
    background: #111;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#hs-script-cancel-btn,
#hs-script-edit-btn,
#hs-script-save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

@media (max-width: 768px) {

    /* Adjust the mobile menu trigger to stay out of the way */
    .hs-mobile-nav-toggle {
        top: 15px !important;
        right: 15px !important;
        left: auto !important;
        /* Move from left to right if needed */
        z-index: 100 !important;
    }

    /* Ensure the main button is always tappable */
    .hs-main-action-btn,
    #generate-btn,
    .write-button {
        position: relative;
        z-index: 1000 !important;
        width: 100% !important;
    }
}

#hs-script-cancel-btn {
    background: #333;
    color: #fff;
}

#hs-script-edit-btn {
    background: #555;
    color: #fff;
}

#hs-script-save-btn {
    background: #d60000;
    color: #fff;
}

@media (max-width: 768px) {
    .hs-script-modal-box {
        width: 95% !important;
        max-height: 95vh !important;
    }

    #hs-script-edit-pane {
        font-size: 16px !important;
    }

    .hs-script-tabs {
        flex-wrap: wrap;
    }

    .hs-script-modal-footer {
        flex-direction: column;
    }

    #hs-script-cancel-btn,
    #hs-script-edit-btn,
    #hs-script-save-btn {
        width: 100% !important;
        margin-top: 10px;
    }
}

/* Horizontal Action Strip Ã¢â‚¬â€ sits in normal document flow BELOW the media element */
/* ARCHITECTURE: The container is in normal flow (not absolute).
   It renders as a 40px strip between the media and the card meta.
   Individual non-heart buttons are hidden via their own opacity.
   The active-heart overrides opacity independently since it lives
   at the same level Ã¢â‚¬â€ no parent opacity trap to escape. */
.card-actions-overlay {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    /* Heart sits on the left; other actions are pushed to the right */
    justify-content: space-between;
    /* Fixed-height interaction strip */
    min-height: 40px;
    width: 100%;
    /* Slightly lighter than the card body Ã¢â‚¬â€ integrates cleanly */
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 8px 12px;
    box-sizing: border-box;
    /* Remove any legacy absolute-position remnants */
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: background 0.2s ease-in-out;
}

/* On hover: the strip gets a subtle dark-red accent line */
.masonry-card:hover .card-actions-overlay,
.recent-item:hover .card-actions-overlay,
.vault-item:hover .card-actions-overlay {
    background: #1f1212;
    border-top-color: #3a1a1a;
}

/* Ensure the icons themselves sit cleanly inside the new row */
.card-actions-overlay a,
.card-actions-overlay i,
.card-actions-overlay button,
.card-actions-overlay .action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 16px !important;
    background: transparent !important;
    border: none !important;
    padding: 5px !important;
    /* Always visible Ã¢â‚¬â€ no hover-gating */
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease-in-out, color 0.2s ease;
}

/* Group the secondary actions (download, animate, delete) to the right */
.card-actions-overlay .action-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1;
    pointer-events: auto;
}

/* Hover highlight on individual action buttons */
.card-actions-overlay a:hover,
.card-actions-overlay button:hover,
.card-actions-overlay .action-btn:hover {
    opacity: 1;
}

.card-actions-overlay a:hover,
.card-actions-overlay i:hover,
.card-actions-overlay button:hover,
.card-actions-overlay .action-btn:hover {
    color: #c80000 !important;
    /* HorrorSchool red on hover */
}

/* Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ ALWAYS-VISIBLE ACTIVE HEART Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬
   A saved/favorited heart icon must be visible at all times without requiring
   a mouseover, so the user can instantly identify saved items in the Vault.
   Achieved by overriding the button's default opacity: 0 when .is-active is set.
Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
.card-actions-overlay .hs-heart-icon.is-active {
    opacity: 1 !important;
    pointer-events: auto !important;
    color: #e53935 !important;
    /* Persistent red so it pops against dark thumbnails */
    filter: drop-shadow(0 0 5px rgba(229, 57, 53, 0.65));
    /* Subtle blood glow for visibility on dark images */
}

.card-actions-overlay .hs-heart-icon.is-active .dashicons {
    color: #e53935 !important;
}

@media (max-width: 768px) {

    /* On touch devices there is no hover, so always show all action buttons */
    .card-actions-overlay {
        background: #1a1a1a;
        pointer-events: auto !important;
    }

    .card-actions-overlay a,
    .card-actions-overlay i,
    .card-actions-overlay button,
    .card-actions-overlay .action-btn,
    .card-actions-overlay .action-btn-group a,
    .card-actions-overlay .action-btn-group button {
        opacity: 1 !important;
        pointer-events: auto !important;
        font-size: 18px !important;
        /* Easier to tap with thumbs */
    }

    .card-actions-overlay .action-btn-group {
        pointer-events: auto !important;
    }
}

/* Re-hide the clipboard textarea/input that was exposed by the flex wildcard */
.card-actions-overlay textarea,
.card-actions-overlay input,
.card-actions-overlay .hs-hidden-text,
.card-actions-overlay .hs-hidden-original,
.card-actions-overlay .hs-hidden-edited,
.card-actions-overlay [style*="display: none"] {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -1 !important;
}

/* Force any buttons inside the action bar to have white text and transparent backgrounds */
.card-actions-overlay button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 5px !important;
    margin: 0 !important;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.card-actions-overlay button i,
.card-actions-overlay button span {
    color: #ffffff !important;
    transition: color 0.2s ease;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.card-actions-overlay button:hover i,
.card-actions-overlay button:hover span,
.card-actions-overlay button:hover {
    color: #c80000 !important;
    /* HorrorSchool red on hover */
}

/* Ensure form wrappers don't disrupt the flex row if the button is inside a form */
.card-actions-overlay form {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}

/* Force SVG icons to be white and visible */
.card-actions-overlay svg,
.card-actions-overlay button svg,
.card-actions-overlay a svg {
    fill: #ffffff !important;
    color: #ffffff !important;
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: fill 0.2s ease;
}

/* Hover state for SVGs */
.card-actions-overlay button:hover svg,
.card-actions-overlay a:hover svg {
    fill: #c80000 !important;
    /* HorrorSchool Red */
}

/* Catch native WordPress Dashicons just in case */
.card-actions-overlay .dashicons,
.card-actions-overlay button .dashicons {
    color: #ffffff !important;
    font-size: 16px !important;
}

/* Heart icon: active/favorited state Ã¢â‚¬â€ rules are defined near the top of the
   action overlay block and scoped to .card-actions-overlay .hs-heart-icon.is-active */

/* ------------------------------------------------------------- 
   GLOBAL APP FOOTER 
------------------------------------------------------------- */
.hs-global-app-footer {
    margin-top: 40px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.hs-global-app-footer p {
    color: #555555;
    font-size: 12px;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hs-footer-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 0 !important;
    align-items: center;
    width: 100% !important;
    justify-content: space-between !important;
}

.hs-footer-nav li a {
    color: #555555;
    font-size: 11px; /* Slightly smaller for better fit */
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
    display: inline-block;
    white-space: nowrap; /* Prevents single words from breaking */
}

.hs-footer-nav li a:hover {
    color: #c80000;
}

/* ------------------------------------------------------------- 
   FAQ PAGE STYLES 
------------------------------------------------------------- */
body.page-template-template-faq {
    overflow-x: hidden !important;
}

.hs-faq-container {
    max-width: 800px;
    margin: 140px auto 60px;
    padding: 0 20px;
}

.hs-faq-header-section {
    text-align: center;
    margin-bottom: 40px;
}

.hs-faq-header-section h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: #fff;
}

#hs-faq-search {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    background: rgba(25, 25, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    outline: none;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#hs-faq-search:focus {
    border-color: #c80000;
}

.hs-faq-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.hs-faq-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.hs-faq-filter-btn:hover {
    background: rgba(200, 0, 0, 0.2);
    border-color: #c80000;
    color: #ffffff;
}

.hs-faq-filter-btn.active {
    background: #c80000;
    border-color: #c80000;
    color: #ffffff;
}

.hs-faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hs-accordion-item {
    background: rgba(25, 25, 25, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: border-color 0.2s ease;
}

.hs-accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.hs-accordion-item.hs-faq-open {
    border-color: #c80000;
    background: rgba(25, 25, 25, 0.8);
}

.hs-faq-q {
    padding: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 0;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.hs-faq-q::after {
    content: '+';
    font-size: 20px;
    color: #c80000;
    transition: transform 0.3s ease;
    display: inline-block;
}

.hs-accordion-item.hs-faq-open .hs-faq-q::after {
    transform: rotate(45deg);
}

.hs-faq-a {
    padding: 0 20px 20px;
    display: none;
    color: #aaa;
    line-height: 1.6;
    font-size: 14px;
}

.hs-faq-a p {
    margin: 0;
}

/* ------------------------------------------------------------- 
   Core 3-Column Studio Layout 
------------------------------------------------------------- */
.hs-studio-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
}

.hs-main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* THE FIX: Prevents child elements from blowing out the container horizontally */
    position: relative;
    padding: 20px 40px 120px 40px;
}

.hs-config-panel {
    width: 320px;
    max-width: 100%;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    background: rgba(11, 11, 11, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.hs-config-panel * {
    box-sizing: border-box !important;
}

/* Fix Toggle Switch Text Wrapping */
.hs-config-panel .toggle-label-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    word-break: break-word;
    /* Prevents long text from pushing the container wide */
    width: 100%;
}

.hs-config-panel .toggle-label-wrapper span {
    flex: 1;
    line-height: 1.4;
    padding-top: 2px;
}

/* The Slim Dock */
.hs-slim-dock {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-top: 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hs-auto-prompt {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #fff;
    font-size: 15px;
    resize: none;
    /* JS will handle height */
    min-height: 24px;
    max-height: 120px;
    padding: 8px 0;
    outline: none;
    margin: 0 !important;
}

.hs-dock-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.hs-dock-actions button {
    margin: 0 !important;
}

/* Micro-Interactions */
.hs-blood-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaaaaa;
    background: rgba(200, 0, 0, 0.1);
    border: 1px solid rgba(200, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.hs-blood-badge span {
    color: #c80000;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hs-studio-wrapper {
        flex-direction: column;
    }

    .hs-main-stage {
        padding: 15px 15px 100px 15px !important;
        /* Reduce padding to maximize space */
    }

    /* Off-Canvas Right Panel */
    .hs-config-panel {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 85%;
        max-width: 320px;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    }

    .hs-config-panel.is-open {
        transform: translateX(0);
    }

    /* Show Mobile Buttons */
    .hs-mobile-config-trigger {
        display: block !important;
    }

    .hs-close-config-panel {
        display: block !important;
        margin-bottom: 20px;
    }

    /* Stack the Slim Dock */
    .hs-slim-dock {
        flex-wrap: wrap;
        padding: 15px;
        border-radius: 8px;
    }

    .hs-auto-prompt {
        width: 100%;
        min-width: 100%;
        margin-bottom: 10px;
    }

    .hs-dock-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hs_submit_btn {
        width: 100%;
        padding: 12px !important;
    }

    /* Mobile Top Bar Display */
    .hs-mobile-top-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: rgba(11, 11, 11, 0.95);
        backdrop-filter: blur(10px);
        padding: 15px;
        margin: -15px -15px 20px -15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        z-index: 990;
    }

    .hs-slim-dock {
        margin-bottom: 30px;
    }
}

/* Active Glow on Slim Dock when Enhanced */
.hs-slim-dock.is-enhanced {
    border-color: rgba(200, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(200, 0, 0, 0.2);
}

/* ------------------------------------------------------------- 
   Config Panel: Flex-Label Container
------------------------------------------------------------- */
/* 1. Force Strict Row Boundary */
.hs-config-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    padding: 10px 0 !important;
    position: relative !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.hs-config-option label {
    flex: 1 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #dddddd !important;
    margin: 0 !important;
    cursor: help !important;
    word-wrap: break-word !important;
    padding-right: 10px !important;
}

/* 3. Lockdown the Text Label */
.hs-config-option label:not(.hs-switch) {
    position: relative !important;
    display: block !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    /* Kills negative margins pulling it left */
    padding: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

/* ------------------------------------------------------------- 
   Hard-Locked Toggle Dimensions
------------------------------------------------------------- */
/* 2. Lockdown the Toggle (Zero out inherited positioning) */
.hs-config-option .hs-switch {
    position: relative !important;
    display: block !important;
    flex: 0 0 36px !important;
    /* Absolute width lockdown */
    width: 36px !important;
    height: 18px !important;
    margin: 0 15px 0 0 !important;
    /* HARD right margin instead of relying on 'gap' */
    padding: 0 !important;
    left: auto !important;
    /* Kills theme-injected overlap */
    right: auto !important;
    transform: none !important;
}

/* 4. Slider Track Constraints */
.hs-slider {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
}

.hs-slider:before {
    height: 14px !important;
    width: 14px !important;
    left: 2px !important;
    bottom: 2px !important;
    background-color: white !important;
    transform: none !important;
}

input:checked+.hs-slider {
    background-color: #c80000 !important;
}

input:checked+.hs-slider:before {
    transform: translateX(18px) !important;
}

/* ------------------------------------------------------------- 
   Pricing Label Contrast
------------------------------------------------------------- */
.hs-cost-modifier {
    color: #c80000 !important;
    font-weight: 800 !important;
    margin-left: 4px !important;
    font-size: 11px !important;
    display: inline-block !important;
    margin-top: 2px !important;
}

/* ------------------------------------------------------------- 
   Reset Defaults Button
------------------------------------------------------------- */
#hs-reset-config {
    margin-top: 40px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #888 !important;
    padding: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: bold !important;
    transition: 0.2s !important;
}

#hs-reset-config:hover {
    background: rgba(200, 0, 0, 0.1) !important;
    color: #fff !important;
    border-color: #c80000 !important;
}

/* ------------------------------------------------------------- 
   Minimalist Tooltip System (CSS-only, Left Breakout)
------------------------------------------------------------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:after {
    content: attr(data-tooltip);
    position: absolute;
    /* Reset old horizontal positioning */
    right: auto !important;
    left: 0 !important;
    bottom: 100% !important;
    top: auto !important;
    /* Anchors it right above the text */

    /* Keep it constrained to the sidebar width */
    width: 240px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
    white-space: normal !important;

    background: #111111;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 11px;
    text-align: left;
    border: 1px solid #c80000;
    box-shadow: -5px -5px 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;

    /* Drop-up animation state */
    transform: translateY(10px) !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
}

[data-tooltip]:hover:after {
    opacity: 1 !important;
    transform: translateY(0) !important;
    /* Smooth upward snap */
}

/* ---------------------------------------------------------
   Instant Infusion Cards Ã¢â‚¬â€ Hover Effects
--------------------------------------------------------- */
.hs-infusion-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hs-infusion-card:hover {
    transform: translateY(-5px);
    border-color: #c80000 !important;
}

.hs-buy-infusion-btn:hover {
    background: #ff0000 !important;
    box-shadow: 0 0 15px rgba(200, 0, 0, 0.5);
}

/* =============================================================
   MOBILE RESPONSIVE AUDIT Ã¢â‚¬â€ Comprehensive 768px Overrides
   Extends the partial blocks above with full Studio coverage.
   Desktop layout is completely unaffected.
============================================================= */
@media (max-width: 768px) {

    /* ----------------------------------------------------------
       1. GRID COLLAPSE Ã¢â‚¬â€ All multi-column grids Ã¢â€ â€™ single column
    ---------------------------------------------------------- */

    /* Recent Concepts grid Ã¢â‚¬â€ horizontal strip on mobile too */
    .recent-grid,
    .recent-grid.script-grid,
    .recent-grid.nightmare-grid {
        flex-wrap: nowrap !important;
        gap: 12px !important;
    }

    /* Recent items Ã¢â‚¬â€ slightly smaller on mobile */
    .recent-item {
        flex: 0 0 200px !important;
        min-height: 140px;
    }

    /* Nightmare video card Ã¢â‚¬â€ keep 16/9 ratio */
    .recent-item.nightmare-item {
        aspect-ratio: 16 / 9 !important;
    }

    /* Vault grid */
    .vault-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Dashboard overview grid */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Pricing / Subscription grid (Transfusion page) */
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-top: 20px !important;
    }

    /* Instant Infusions 3-column grid (inline style override) */
    div[style*="grid-template-columns: repeat(3"],
    .hs-infusion-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Infusion cards Ã¢â‚¬â€ remove hover lift on touch (no hover state) */
    .hs-infusion-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Script concept card Ã¢â‚¬â€ let height be natural */
    .hs-concept-card {
        aspect-ratio: unset !important;
        min-height: 120px;
    }

    /* ----------------------------------------------------------
       2. MODALS Ã¢â‚¬â€ Script Doctor & Vault modals
    ---------------------------------------------------------- */

    /* The overlay backdrop Ã¢â‚¬â€ already full screen, no change needed */
    .hs-modal-overlay {
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    /* The modal box Ã¢â‚¬â€ shrink from 80% fixed to 95% of viewport */
    .hs-modal-box {
        width: 95% !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        box-sizing: border-box !important;
    }

    /* The scrollable body Ã¢â‚¬â€ cap height so it doesn't overflow phone screen */
    .hs-modal-body {
        max-height: 65vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Modal content text Ã¢â‚¬â€ readable size on mobile */
    #hs-sd-modal-content {
        font-size: 13px !important;
        line-height: 1.7 !important;
        min-height: unset !important;
    }

    /* ----------------------------------------------------------
       3. TOUCH TARGETS Ã¢â‚¬â€ Primary action buttons
    ---------------------------------------------------------- */

    /* Main generate / diagnose / summon buttons */
    .hs-primary-btn,
    #generate-btn,
    #hs-manifest-video-btn,
    #hs-diagnose-btn {
        padding: 15px 20px !important;
        font-size: 14px !important;
        min-height: 48px !important;
        touch-action: manipulation !important;
    }

    /* Infusion Buy buttons */
    .hs-buy-infusion-btn {
        padding: 15px !important;
        width: 100% !important;
        font-size: 13px !important;
        min-height: 48px !important;
        touch-action: manipulation !important;
        color: #fff !important;
    }

    /* Pricing card CTA buttons */
    .pricing-btn,
    .pricing-card button,
    .pricing-card a {
        padding: 15px !important;
        font-size: 14px !important;
        width: 100% !important;
        min-height: 48px !important;
        display: block !important;
        text-align: center !important;
        box-sizing: border-box !important;
        color: #fff !important;
    }

    /* Config panel action buttons */
    .action-btn {
        padding: 10px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    /* ----------------------------------------------------------
       4. CARD ACTIONS Ã¢â‚¬â€ Always visible on touch (no hover)
    ---------------------------------------------------------- */

    /* On desktop, overlay appears on :hover. On mobile, always show */
    .card-actions-overlay {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)) !important;
    }

    .item-actions {
        transform: translateY(0) !important;
    }

    /* ----------------------------------------------------------
       5. CANVAS & STAGE AREAS
    ---------------------------------------------------------- */

    /* Script canvas Ã¢â‚¬â€ remove large min-height on mobile */
    .script-canvas {
        min-height: 200px !important;
    }

    /* Video canvas */
    #hs-nightmare-result-container {
        aspect-ratio: 16 / 9 !important;
        width: 100% !important;
    }

    /* Image canvas */
    .canvas-area {
        aspect-ratio: 4 / 3 !important;
        border-radius: 8px !important;
    }

    /* ----------------------------------------------------------
       6. TYPOGRAPHY & STRUCTURAL SPACING
    ---------------------------------------------------------- */

    /* h1 page titles Ã¢â‚¬â€ scale down on phone */
    .hs-main-stage h1 {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }

    .hs-main-stage h2 {
        font-size: 16px !important;
        margin-top: 30px !important;
    }

    /* Space between major sections */
    .hs-slim-dock {
        margin-top: 16px !important;
    }

    /* Recent grid heading spacing */
    .hs-main-stage h2+.recent-grid {
        margin-top: 12px !important;
    }

    /* Infusion card padding */
    .hs-infusion-card {
        padding: 20px !important;
    }

    /* Pricing card padding */
    .pricing-card {
        padding: 24px 20px !important;
    }

    /* Bottom safe area for nav bar */
    .hs-main-stage {
        padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }

    /* ----------------------------------------------------------
       7. DOCK INPUT Ã¢â‚¬â€ Full-width textarea on mobile
    ---------------------------------------------------------- */

    .hs-slim-dock textarea,
    .hs-auto-prompt {
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Dock actions row Ã¢â‚¬â€ keep badge + button side by side */
    .hs-dock-actions {
        gap: 10px !important;
    }

    .hs-blood-badge {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}

/* Force the datalist dropdown arrow to appear and be clickable */
input.director-combo {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    padding-right: 25px; /* Make room for the arrow */
}
input.director-combo::-webkit-calendar-picker-indicator {
    display: block !important;
    opacity: 1 !important;
    cursor: pointer !important;
    background-color: transparent !important;
}

/* ==========================================================================
   GLOBAL UTILITIES: Blood Droplet Loader
   ========================================================================== */
.hs-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 80px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.4);
}

.hs-blood-loader {
    width: 20px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(150, 0, 0, 0.6));
    animation: bloodDripAndSplash 0.8s cubic-bezier(1, 0, 0.9, 1) infinite;
    transform-origin: bottom center;
}

@keyframes bloodDripAndSplash {
    0% {
        transform: translateY(-40px) scaleY(1.2) scaleX(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    60% {
        transform: translateY(20px) scaleY(1) scaleX(1);
    }
    80% {
        /* Squash impact */
        transform: translateY(25px) scaleY(0.4) scaleX(1.6);
        opacity: 1;
    }
    100% {
        transform: translateY(30px) scaleY(0.1) scaleX(2.5);
        opacity: 0;
    }
}

/* ==========================================================================
   CAST STUDIO UX HELP TEXT
   ========================================================================== */
.hs-help-text-subtle {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    padding-top: 10px;
    border-top: 1px dashed #333;
}

.hs-cast-read-more {
    color: #c80000;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hs-cast-read-more:hover {
    color: #ff0000;
    text-decoration: underline;
}

.hs-cast-extended-text {
    color: #aaa;
    font-style: italic;
    background: #111;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #222;
}

/* SFX Inpainting Canvas Loader Overlay */
.hs-canvas-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
    border-radius: 0;
}

/* Vault Header Tooltip */
.hs-tooltip-wrapper {
    position: relative;
}

.hs-tooltip-wrapper .hs-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 220px;
    background: #111;
    color: #ccc;
    padding: 12px;
    border: 1px solid #c80000;
    border-radius: 6px;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.9);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
    white-space: normal;
}

.hs-tooltip-wrapper:hover .hs-tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Main Stage Image Hover Actions */
#hs-generated-stage-wrapper .hs-stage-actions-hover {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#hs-generated-stage-wrapper:hover .hs-stage-actions-hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* THE RESTORED LIFEBLOOD DRIP */
@keyframes bloodDripAndSplash {
    0% {
        transform: translateY(-40px) scaleY(1.2) scaleX(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    60% {
        transform: translateY(20px) scaleY(1) scaleX(1);
    }
    80% {
        /* Squash impact on the 'ground' */
        transform: translateY(25px) scaleY(0.4) scaleX(1.6);
        opacity: 1;
    }
    100% {
        /* Fade out as it stains the floor */
        transform: translateY(30px) scaleY(0.1) scaleX(2.5);
        opacity: 0;
    }
}

.hs-blood-loader, 
.hs-vault-picker-grid svg, 
.hs-shortlist-gallery-grid svg,
.hs-loading-container svg {
    /* Standardized to the brand-standard 0.8s drip cycle */
    animation: bloodDripAndSplash 0.8s infinite cubic-bezier(1, 0, 0.9, 1) !important;
    transform-origin: bottom center !important;
    filter: drop-shadow(0 4px 6px rgba(150, 0, 0, 0.6)) !important;
}



.hs-copy-prompt-btn {
    position: relative !important; /* Required for the pill anchor */
    flex-shrink: 0 !important;
}

.hs-copy-prompt-btn.hs-copy-success .dashicons {
    color: #c80000 !important;
}

/* Mobile Specific Footer Polish */
@media (max-width: 768px) {
    .hs-global-app-footer {
        text-align: center !important;
        padding-bottom: 40px !important;
    }
    
    .hs-footer-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 0 !important;
    align-items: center;
    width: 100% !important;
    justify-content: space-between !important;
}
    
    .hs-global-app-footer p {
        margin-bottom: 15px !important;
    }
}

/* Vault Modal Prompt Footer */
.hs-modal-prompt-footer {
    padding: 20px 30px;
    background: #111;
    border-top: 1px solid #222;
    border-radius: 0 0 8px 8px;
}

.hs-modal-prompt-box {
    position: relative;
    padding: 15px 45px 15px 15px;
    background: #0b0b0b;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ccc;
    font-size: 13px;
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
}

.hs-modal-prompt-footer .hs-modal-date {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

/* NUCLEAR FLEXBOX BLOWOUT PREVENTION */
.studio-main, 
.hs-studio-wrapper, 
.hs-main-stage {
    min-width: 0 !important; 
    max-width: 100% !important;
}

.hs-studio-wrapper {
    overflow-x: hidden !important; /* Forces any stray pixels to clip instead of pushing the sidebar */
}

/* Inject CSS Ã¢â‚¬â€ only for layout/sizing; do NOT override existing color/state styles */
.hs-recent-item-card { width: 300px !important; }
.card-actions-overlay {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    justify-content: space-between !important;
}
.hs-btn-upscale {
    min-width: 28px !important;
    height: 28px !important;
    padding: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* ==========================================================
   PIPELINE MENU (More Options Dropdown)
   ========================================================== */
.hs-more-menu-wrapper {
    position: relative !important;
    display: inline-block !important;
}
.hs-more-menu-trigger {
    background: rgba(0,0,0,0.7) !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}
.hs-more-menu-dropdown {
    position: absolute;
    bottom: 115%;
    right: 50%;
    transform: translateX(50%);
    background: #0b0b0b;
    border: 1px solid #c80000;
    border-radius: 6px;
    display: none;
    flex-direction: column;
    padding: 5px;
    gap: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.9);
    z-index: 50;
}
.hs-more-menu-wrapper:hover .hs-more-menu-dropdown {
    display: flex;
}
/* Style the buttons inside the dropdown */
.hs-more-menu-dropdown .action-btn {
    width: 100% !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    color: #ccc;
    padding: 12px;
    border: 1px solid #c80000;
    border-radius: 6px;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.9);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
    white-space: normal;
}

.hs-tooltip-wrapper:hover .hs-tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Main Stage Image Hover Actions */
#hs-generated-stage-wrapper .hs-stage-actions-hover {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#hs-generated-stage-wrapper:hover .hs-stage-actions-hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* THE RESTORED LIFEBLOOD DRIP */
@keyframes bloodDripAndSplash {
    0% {
        transform: translateY(-40px) scaleY(1.2) scaleX(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    60% {
        transform: translateY(20px) scaleY(1) scaleX(1);
    }
    80% {
        /* Squash impact on the 'ground' */
        transform: translateY(25px) scaleY(0.4) scaleX(1.6);
        opacity: 1;
    }
    100% {
        /* Fade out as it stains the floor */
        transform: translateY(30px) scaleY(0.1) scaleX(2.5);
        opacity: 0;
    }
}

.hs-blood-loader, 
.hs-vault-picker-grid svg, 
.hs-shortlist-gallery-grid svg,
.hs-loading-container svg {
    /* Standardized to the brand-standard 0.8s drip cycle */
    animation: bloodDripAndSplash 0.8s infinite cubic-bezier(1, 0, 0.9, 1) !important;
    transform-origin: bottom center !important;
    filter: drop-shadow(0 4px 6px rgba(150, 0, 0, 0.6)) !important;
}



.hs-copy-prompt-btn {
    position: relative !important; /* Required for the pill anchor */
    flex-shrink: 0 !important;
}

.hs-copy-prompt-btn.hs-copy-success .dashicons {
    color: #c80000 !important;
}

/* Mobile Specific Footer Polish */
@media (max-width: 768px) {
    .hs-global-app-footer {
        text-align: center !important;
        padding-bottom: 40px !important;
    }
    
    .hs-footer-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 0 !important;
    align-items: center;
    width: 100% !important;
    justify-content: space-between !important;
}
    
    .hs-global-app-footer p {
        margin-bottom: 15px !important;
    }
}

/* Vault Modal Prompt Footer */
.hs-modal-prompt-footer {
    padding: 20px 30px;
    background: #111;
    border-top: 1px solid #222;
    border-radius: 0 0 8px 8px;
}

.hs-modal-prompt-box {
    position: relative;
    padding: 15px 45px 15px 15px;
    background: #0b0b0b;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ccc;
    font-size: 13px;
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
}

.hs-modal-prompt-footer .hs-modal-date {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

/* NUCLEAR FLEXBOX BLOWOUT PREVENTION */
.studio-main, 
.hs-studio-wrapper, 
.hs-main-stage {
    min-width: 0 !important; 
    max-width: 100% !important;
}

.hs-studio-wrapper {
    overflow-x: hidden !important; /* Forces any stray pixels to clip instead of pushing the sidebar */
}

/* Inject CSS — only for layout/sizing; do NOT override existing color/state styles */
.hs-recent-item-card { width: 300px !important; }
.card-actions-overlay {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    justify-content: space-between !important;
}
.hs-btn-upscale {
    min-width: 28px !important;
    height: 28px !important;
    padding: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}
.hs-btn-upscale .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

/* ==========================================================
   PIPELINE MENU (More Options Dropdown)
   ========================================================== */
.hs-more-menu-wrapper {
    position: relative !important;
    display: inline-block !important;
}
.hs-more-menu-trigger {
    background: rgba(0,0,0,0.7) !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}
.hs-more-menu-dropdown {
    position: absolute;
    bottom: 115%;
    right: 50%;
    transform: translateX(50%);
    background: #0b0b0b;
    border: 1px solid #c80000;
    border-radius: 6px;
    display: none;
    flex-direction: column;
    padding: 5px;
    gap: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.9);
    z-index: 50;
}
.hs-more-menu-wrapper:hover .hs-more-menu-dropdown {
    display: flex;
}
/* Style the buttons inside the dropdown */
.hs-more-menu-dropdown .action-btn {
    width: 100% !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    justify-content: flex-start !important;
    color: #ccc !important;
    background: transparent !important;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.hs-more-menu-dropdown .action-btn:hover {
    background: #c80000 !important;
    color: #fff !important;
}
/* ==========================================================
   HS CUSTOM TOGGLE SWITCHES
   ========================================================== */
.hs-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  margin: 0;
}
.hs-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.hs-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333;
  transition: .3s;
}
.hs-slider:before {
  position: absolute;
  content: ;
 height: 16px;
 width: 16px;
 left: 3px;
 bottom: 3px;
 background-color: #aaa;
 transition: .3s;
}
.hs-switch input:checked + .hs-slider {
 background-color: #c80000;
}
.hs-switch input:checked + .hs-slider:before {
 transform: translateX(22px);
 background-color: #fff;
}
.hs-slider.hs-round {
 border-radius: 22px;
}
.hs-slider.hs-round:before {
 border-radius: 50%;
}

/* ==========================================================
   HS UI HIGHLIGHT PULSE
   ========================================================== */
@keyframes hsBloodPulse {
    0% { box-shadow: 0 0 0 rgba(200, 0, 0, 0); border-color: #333; }
    50% { box-shadow: 0 0 12px rgba(200, 0, 0, 0.4); border-color: #c80000; }
    100% { box-shadow: 0 0 0 rgba(200, 0, 0, 0); border-color: #333; }
}
.hs-active-glow {
    animation: hsBloodPulse 2.5s infinite ease-in-out;
    transition: border-color 0.3s;
}

/* Prompt Hint — static tip line under prompt textareas */
@keyframes hs-bulb-flicker {
    0%    { opacity: 1;    filter: brightness(1);   }
    6.9%  { opacity: 1;    filter: brightness(1);   }
    7%    { opacity: 0;    filter: brightness(0);   }
    7.4%  { opacity: 1;    filter: brightness(1.7); }
    7.6%  { opacity: 0.1;  filter: brightness(0.05);}
    7.9%  { opacity: 1;    filter: brightness(1.3); }
    8%    { opacity: 1;    filter: brightness(1);   }
    57.9% { opacity: 1;    filter: brightness(1);   }
    58%   { opacity: 0;    filter: brightness(0);   }
    58.3% { opacity: 1;    filter: brightness(2);   }
    58.5% { opacity: 0;    filter: brightness(0);   }
    58.7% { opacity: 1;    filter: brightness(1.5); }
    58.9% { opacity: 1;    filter: brightness(1);   }
    100%  { opacity: 1;    filter: brightness(1);   }
}
.hs-prompt-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 5px 0 0 2px;
    font-size: 10px;
    color: #888;
    line-height: 1.4;
    letter-spacing: 0.3px;
}
.hs-prompt-hint .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    color: #c8a000;
    flex-shrink: 0;
    animation: hs-bulb-flicker 9s infinite steps(1, end);
}
.hs-prompt-hint a {
    color: #993333;
    text-decoration: none;
    font-weight: 600;
}
.hs-prompt-hint a:hover {
    color: #c80000;
    text-decoration: underline;
}




/* ==========================================================================
   RECENT MANIFESTATIONS — Studio Dashboard Card Upgrade
   dash-item-media holds the 4/3 thumbnail; action strip sits in normal flow
   ========================================================================== */
.dash-item {
    aspect-ratio: unset !important;   /* let content define height */
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}
.dash-item-media {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}
.dash-item-media img,
.dash-item-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    transition: opacity 0.3s;
    display: block;
}
.dash-item:hover .dash-item-media img,
.dash-item:hover .dash-item-media video {
    opacity: 1;
}
.dash-item-media .play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.dash-item-media .play-indicator .dashicons {
    font-size: 24px;
    color: #fff;
}
.dash-item:hover .card-actions-overlay {
    background: #1f1212;
    border-top-color: #3a1a1a;
}

ul#menu-app-footer-links {
    margin-left: 0 !important;
}

@media (max-width: 768px) {
    .hs-prompt-hint {
        display: none !important;
    }
}

