/* ============================================================
   Custom overrides & additions outside the original app CSS
   ============================================================ */

/* ── Accent colour utility ── */
.text-accent {
    color: #EFFB53;
}

/* ── Header ── */
.container {
    --bs-gutter-x: 60px;
}

.header-right {
    gap: 10px;
}

.signin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--bg);
    color: var(--text);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}
.signin-btn:hover {
    background: var(--theme);
    color: var(--header);
}
@media (max-width: 991px) {
    .signin-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

.header-main .main-menu ul li.nav-tools .submenu {
    min-width: 300px;
}

.header-main .main-menu ul li.nav-tools .submenu li a {
    white-space: nowrap;
}

/* Prevent desktop menu FOUC on mobile before MeanMenu initializes */
.mean__menu-wrapper {
    display: none;
}

@media (min-width: 1200px) {
    .mean__menu-wrapper {
        display: block;
    }
}

@media (max-width: 1399px) {
    .header-main .main-menu ul li.nav-tools .submenu {
        min-width: 270px;
    }
}

/* Fix mobile MeanMenu expand/collapse icon alignment */
.mobile-menu .mean-container .mean-nav ul li > a.mean-expand {
    margin-top: 10px;
}

.section-title h6 img[src*="star.webp"] {
    width: 22px;
    height: 22px;
}

/* Dropdown group labels */
.header-main .main-menu ul li.nav-tools .submenu li.submenu-group-label {
    padding: 6px 20px 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme);
    pointer-events: none;
    cursor: default;
    border-bottom: none;
}
.header-main .main-menu ul li.nav-tools .submenu li.submenu-group-label a {
    display: none;
}
.header-main .main-menu ul li.nav-tools .submenu li.submenu-group-label--mt {
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

/* Mobile MeanMenu group labels */
.mean-container .mean-nav ul li.submenu-group-label {
    padding: 8px 20px 4px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--theme) !important;
    pointer-events: none;
    cursor: default;
    border-top: none !important;
}
.mean-container .mean-nav ul li.submenu-group-label > a:first-child {
    display: none !important;
}
.mean-container .mean-nav ul li.submenu-group-label > a.mean-expand {
    display: none !important;
}
.mean-container .mean-nav ul li.submenu-group-label--mt {
    margin-top: 0 !important;
    border-top: 1px solid var(--border) !important;
    padding-top: 8px !important;
}

/* ── Global Tool Dropdown ── */
.tool-dropdown {
    position: relative;
}

.tool-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(207, 208, 212, 0.35);
    background: #2A2A2E;
    color: #CDCDCD;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: left;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.tool-dropdown-trigger:hover {
    border-color: rgba(239, 251, 83, 0.42);
}

.tool-dropdown.is-open .tool-dropdown-trigger {
    border-color: rgba(239, 251, 83, 0.62);
    box-shadow: 0 0 0 3px rgba(239, 251, 83, 0.12);
}

.tool-dropdown-chevron {
    color: #CDCDCD;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.tool-dropdown.is-open .tool-dropdown-chevron {
    transform: rotate(180deg);
}

.tool-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(207, 208, 212, 0.22);
    background: #1f2025;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.tool-dropdown.is-open .tool-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tool-dropdown-option {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.tool-dropdown-option .tool-dropdown-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(207, 208, 212, 0.2);
    background: #2A2A2E;
    color: #CDCDCD;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tool-dropdown-option:hover .tool-dropdown-option-label {
    border-color: rgba(239, 251, 83, 0.46);
    background: #31333a;
    color: #ffffff;
}

.tool-dropdown-option.active .tool-dropdown-option-label {
    border-color: rgba(239, 251, 83, 0.6);
    background: rgba(239, 251, 83, 0.14);
    color: #EFFB53;
}

.tool-dropdown-option.active:hover .tool-dropdown-option-label {
    background: rgba(239, 251, 83, 0.2);
}

/* Trigger preview slot (e.g. aspect shape inside trigger) */
.tool-dropdown-trigger-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Remove vertical margin when shape is inline (trigger or dropdown option) */
.tool-dropdown-trigger-preview .aspect-shape,
.tool-dropdown-option-label .aspect-shape {
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Fixed-width shape slot so all labels align regardless of shape width */
.tool-dropdown-trigger-preview,
.tool-dropdown-option-label {
    display: flex;
    align-items: center;
}

.tool-dropdown-shape-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    flex-shrink: 0;
}

/* ── Aspect Ratio Mobile Dropdown ── */
.aspect-ratio-dropdown-wrap {
    display: none;
    margin-bottom: 0.65rem;
    position: relative;
    z-index: 100;
}

@media (max-width: 767px) {
    .aspect-ratio-dropdown-wrap {
        display: block;
    }

    .aspect-ratio-selector {
        display: none !important;
    }
}

/* ── Aspect Ratio Shape Icons ── */
.aspect-shape {
    display: block;
    width:  calc(var(--ar-w) / var(--ar-h) * 26px);
    height: 26px;
    max-width: 40px;
    min-width: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin-bottom: 5px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.aspect-ratio-option:hover .aspect-shape {
    background: rgba(239, 251, 83, 0.15);
    border-color: rgba(239, 251, 83, 0.4);
}

.aspect-ratio-option.active .aspect-shape {
    background: #151518;
    border-color: #151518;
}

@media (max-width: 767px) {
    .aspect-shape {
        width:  calc(var(--ar-w) / var(--ar-h) * 20px);
        height: 20px;
        max-width: 32px;
        min-width: 13px;
        margin-bottom: 3px;
    }
}

/* ── Showcase GLightbox ── */
.showcase-items a.glightbox {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}
.showcase-items a.glightbox img {
    display: block;
    width: 100%;
    transition: transform .4s ease;
}
.showcase-items a.glightbox:hover img {
    transform: scale(1.05);
}
.showcase-items a.glightbox::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity .25s ease;
}
.showcase-items a.glightbox:hover::after {
    opacity: 1;
}
.showcase-items a.glightbox .thumb-expand {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.75);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity .2s ease, transform .2s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,.7);
}
.showcase-items a.glightbox:hover .thumb-expand {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
