/* assets/css/generator-tier.css */

.generator-bottom-wrapper-tier {
    display: flex;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    min-width: 0;
    align-self: stretch;
    box-sizing: border-box;
}

.generator-tier-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
}

.generator-tier-input-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
}

.generator-tier-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    gap: 0;
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    margin-right: 0;
    align-self: stretch;
}

.generator-tier-tab {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    padding: 6px 0;
    border: 1px solid rgba(255,255,255,0.12);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.56);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.generator-tier-tab + .generator-tier-tab {
    margin-top: 0;
}

.generator-tier-tab-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 9px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    user-select: none;
    pointer-events: none;
}

.generator-tier-tab:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.generator-tier-tab.is-active {
    color: #ffffff;
}

.generator-bottom-wrapper-tier-image[data-active-tier="light"] .generator-tier-tab[data-tier="light"] {
    background: rgba(141, 198, 63, 0.22);
    border-color: rgba(141, 198, 63, 0.42);
    box-shadow: inset 0 0 0 1px rgba(141, 198, 63, 0.16);
}

.generator-bottom-wrapper-tier-image[data-active-tier="standard"] .generator-tier-tab[data-tier="standard"] {
    background: rgba(59, 156, 255, 0.22);
    border-color: rgba(59, 156, 255, 0.42);
    box-shadow: inset 0 0 0 1px rgba(59, 156, 255, 0.16);
}

.generator-bottom-wrapper-tier-image[data-active-tier="pro"] .generator-tier-tab[data-tier="pro"] {
    background: rgba(122, 33, 58, 0.3);
    border-color: rgba(122, 33, 58, 0.48);
    box-shadow: inset 0 0 0 1px rgba(122, 33, 58, 0.18);
}

.generator-bottom-wrapper-tier-image[data-active-tier="light"] .technical-tray,
.generator-bottom-wrapper-tier-image[data-active-tier="light"] .floating-input-island {
    border-color: rgba(141, 198, 63, 0.34);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 -4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(141, 198, 63, 0.08);
}

.generator-bottom-wrapper-tier-image[data-active-tier="standard"] .technical-tray,
.generator-bottom-wrapper-tier-image[data-active-tier="standard"] .floating-input-island {
    border-color: rgba(59, 156, 255, 0.34);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 -4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 156, 255, 0.1);
}

.generator-bottom-wrapper-tier-image[data-active-tier="pro"] .technical-tray,
.generator-bottom-wrapper-tier-image[data-active-tier="pro"] .floating-input-island {
    border-color: rgba(122, 33, 58, 0.42);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 -4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(122, 33, 58, 0.12);
}

.generator-bottom-wrapper-tier-image[data-active-tier="light"] .send-btn:not(:disabled) {
    background: linear-gradient(180deg, rgba(141, 198, 63, 0.92) 0%, rgba(106, 157, 37, 0.92) 100%);
    box-shadow: 0 0 16px rgba(141, 198, 63, 0.26);
}

.generator-bottom-wrapper-tier-image[data-active-tier="standard"] .send-btn:not(:disabled) {
    background: linear-gradient(180deg, rgba(59, 156, 255, 0.92) 0%, rgba(34, 116, 193, 0.92) 100%);
    box-shadow: 0 0 16px rgba(59, 156, 255, 0.26);
}

.generator-bottom-wrapper-tier-image[data-active-tier="pro"] .send-btn:not(:disabled) {
    background: linear-gradient(180deg, rgba(122, 33, 58, 0.96) 0%, rgba(90, 21, 43, 0.96) 100%);
    box-shadow: 0 0 16px rgba(122, 33, 58, 0.28);
}

.generator-bottom-wrapper-tier-image[data-active-tier="light"] .sq-action-btn[data-action="upscale"]:not(:disabled) {
    color: rgba(214, 255, 170, 0.96);
    border-color: rgba(141, 198, 63, 0.42);
    background: rgba(141, 198, 63, 0.08);
}

.generator-bottom-wrapper-tier-image[data-active-tier="light"] .sq-action-btn[data-action="upscale"]:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(141, 198, 63, 0.7);
    background: rgba(141, 198, 63, 0.18);
    box-shadow: 0 0 14px rgba(141, 198, 63, 0.2);
}

.generator-bottom-wrapper-tier-image[data-active-tier="standard"] .sq-action-btn[data-action="upscale"]:not(:disabled) {
    color: rgba(199, 227, 255, 0.98);
    border-color: rgba(59, 156, 255, 0.44);
    background: rgba(59, 156, 255, 0.08);
}

.generator-bottom-wrapper-tier-image[data-active-tier="standard"] .sq-action-btn[data-action="upscale"]:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(59, 156, 255, 0.72);
    background: rgba(59, 156, 255, 0.18);
    box-shadow: 0 0 14px rgba(59, 156, 255, 0.22);
}

.generator-bottom-wrapper-tier-image[data-active-tier="pro"] .sq-action-btn[data-action="upscale"]:not(:disabled) {
    color: rgba(255, 202, 217, 0.98);
    border-color: rgba(122, 33, 58, 0.46);
    background: rgba(122, 33, 58, 0.1);
}

.generator-bottom-wrapper-tier-image[data-active-tier="pro"] .sq-action-btn[data-action="upscale"]:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(122, 33, 58, 0.74);
    background: rgba(122, 33, 58, 0.2);
    box-shadow: 0 0 14px rgba(122, 33, 58, 0.24);
}

.generator-bottom-wrapper-tier-video[data-active-tier="light"] .generator-tier-tab[data-tier="light"] {
    background: rgba(141, 198, 63, 0.22);
    border-color: rgba(141, 198, 63, 0.42);
    box-shadow: inset 0 0 0 1px rgba(141, 198, 63, 0.16);
}

.generator-bottom-wrapper-tier-video[data-active-tier="standard"] .generator-tier-tab[data-tier="standard"] {
    background: rgba(181, 59, 255, 0.22);
    border-color: rgba(181, 59, 255, 0.42);
    box-shadow: inset 0 0 0 1px rgba(181, 59, 255, 0.16);
}

.generator-bottom-wrapper-tier-video[data-active-tier="pro"] .generator-tier-tab[data-tier="pro"] {
    background: rgba(122, 33, 58, 0.3);
    border-color: rgba(122, 33, 58, 0.48);
    box-shadow: inset 0 0 0 1px rgba(122, 33, 58, 0.18);
}

.generator-bottom-wrapper-tier-video[data-active-tier="light"] .technical-tray,
.generator-bottom-wrapper-tier-video[data-active-tier="light"] .floating-input-island {
    border-color: rgba(141, 198, 63, 0.34);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 -4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(141, 198, 63, 0.08);
}

.generator-bottom-wrapper-tier-video[data-active-tier="standard"] .technical-tray,
.generator-bottom-wrapper-tier-video[data-active-tier="standard"] .floating-input-island {
    border-color: rgba(181, 59, 255, 0.34);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 -4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(181, 59, 255, 0.1);
}

.generator-bottom-wrapper-tier-video[data-active-tier="pro"] .technical-tray,
.generator-bottom-wrapper-tier-video[data-active-tier="pro"] .floating-input-island {
    border-color: rgba(122, 33, 58, 0.42);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 -4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(122, 33, 58, 0.12);
}

.generator-bottom-wrapper-tier-video[data-active-tier="light"] .send-btn:not(:disabled) {
    background: linear-gradient(180deg, rgba(141, 198, 63, 0.92) 0%, rgba(106, 157, 37, 0.92) 100%);
    box-shadow: 0 0 16px rgba(141, 198, 63, 0.26);
}

.generator-bottom-wrapper-tier-video[data-active-tier="standard"] .send-btn:not(:disabled) {
    background: linear-gradient(180deg, rgba(181, 59, 255, 0.92) 0%, rgba(132, 39, 188, 0.92) 100%);
    box-shadow: 0 0 16px rgba(181, 59, 255, 0.26);
}

.generator-bottom-wrapper-tier-video[data-active-tier="pro"] .send-btn:not(:disabled) {
    background: linear-gradient(180deg, rgba(122, 33, 58, 0.96) 0%, rgba(90, 21, 43, 0.96) 100%);
    box-shadow: 0 0 16px rgba(122, 33, 58, 0.28);
}

@media (min-width: 769px) {
    .generator-bottom-wrapper-tier {
        align-items: flex-start !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row {
        display: flex !important;
        align-items: stretch !important;
        gap: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row > .generator-tier-sidebar {
        flex: 0 0 30px !important;
        width: 30px !important;
        min-width: 30px !important;
        align-self: stretch !important;
        margin-right: -1px !important;
        margin-bottom: 0 !important;
        transform: none !important;
        position: relative !important;
        z-index: 1 !important;
        overflow: hidden !important;
        border-radius: 12px 0 0 12px !important;
        background: transparent !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row > .generator-tier-sidebar .generator-tier-tab {
        box-sizing: border-box !important;
        border-radius: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row > .generator-tier-sidebar .generator-tier-tab:first-child {
        border-top-left-radius: 12px !important;
        border-bottom-left-radius: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row > .generator-tier-sidebar .generator-tier-tab:last-child {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 12px !important;
        margin-bottom: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row > .floating-input-island {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        margin-left: 0 !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-input-row > .floating-input-island::before {
        content: '' !important;
        position: absolute !important;
        left: -1px !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 1px !important;
        background: inherit !important;
        pointer-events: none !important;
        z-index: 3 !important;
    }

    .generator-bottom-wrapper-tier .technical-tray {
        width: max-content !important;
        min-width: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-main > .technical-tray {
        margin-bottom: 0 !important;
    }

    .generator-bottom-wrapper-tier .generator-tier-main > .generator-tier-input-row {
        margin-top: 0 !important;
    }

    .generator-bottom-wrapper-tier-image .generator-tier-main,
    .generator-bottom-wrapper-tier-video .generator-tier-main {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        min-width: 0;
    }

    .generator-bottom-wrapper-tier-image .generator-tier-sidebar,
    .generator-bottom-wrapper-tier-video .generator-tier-sidebar {
        position: relative;
        top: auto;
        align-self: stretch;
        margin-right: 0;
        margin-top: 0;
        transform: translateX(1px);
        z-index: 2;
        height: auto;
    }

    .generator-bottom-wrapper-tier-image .floating-input-island,
    .generator-bottom-wrapper-tier-video .floating-input-island {
        width: 100%;
        min-width: 0;
    }

    .generator-bottom-wrapper-tier-image .technical-tray,
    .generator-bottom-wrapper-tier-video .technical-tray {
        width: max-content;
        min-width: 0;
    }

    .generator-bottom-wrapper-tier-video .generator-tier-input-row > .generator-tier-sidebar {
        margin-top: 0 !important;
    }

    .generator-bottom-wrapper-tier-video .generator-tier-input-row > .floating-input-island {
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9), 0 -8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    .generator-bottom-wrapper.generator-bottom-wrapper-tier.generator-bottom-wrapper-tier-video {
        width: 100% !important;
        min-width: 0 !important;
        align-self: stretch !important;
        box-sizing: border-box !important;
    }

    .generator-bottom-wrapper.generator-bottom-wrapper-tier.generator-bottom-wrapper-tier-video > .generator-tier-main {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        align-self: stretch !important;
        box-sizing: border-box !important;
    }

    .generator-bottom-wrapper.generator-bottom-wrapper-tier.generator-bottom-wrapper-tier-video > .generator-tier-main > .generator-tier-input-row {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        align-self: stretch !important;
        box-sizing: border-box !important;
    }

    .generator-bottom-wrapper.generator-bottom-wrapper-tier.generator-bottom-wrapper-tier-video > .generator-tier-main > .generator-tier-input-row > .generator-tier-sidebar {
        flex: 0 0 30px !important;
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        box-sizing: border-box !important;
    }

    .generator-bottom-wrapper.generator-bottom-wrapper-tier.generator-bottom-wrapper-tier-video > .generator-tier-main > .generator-tier-input-row > .floating-input-island {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .generator-bottom-wrapper.generator-bottom-wrapper-tier.generator-bottom-wrapper-tier-video > .generator-tier-main > .technical-tray {
        align-self: flex-start;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .generator-bottom-wrapper-tier {
        display: block;
    }

    .technical-tray {
        margin-left: 0 !important;
    }

        .generator-tier-input-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .generator-tier-sidebar {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        margin-right: 0;
        margin-bottom: 0;
        gap: 8px;
        order: -1;
        align-self: auto !important;
    }

    .generator-tier-main,
    .generator-bottom-wrapper-tier-image .generator-tier-main,
    .generator-bottom-wrapper-tier-video .generator-tier-main {
        width: 100% !important;
        min-width: 0 !important;
    }

    .generator-tier-main {
        width: 100%;
        min-width: 0;
    }

        .generator-tier-tab {
        flex: 1 1 0;
        min-height: 40px;
        height: 40px;
        max-height: 40px;
        padding: 0 10px;
        border-right: 1px solid rgba(255,255,255,0.12);
        border-radius: 12px;
        overflow: hidden;
    }

    .generator-tier-tab + .generator-tier-tab {
        margin-top: 0;
    }

    .generator-tier-tab-label {
        writing-mode: initial;
        transform: none;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.04em;
        text-align: center;
    }.generator-tier-input-row > .floating-input-island {
        width: 100% !important;
        min-width: 0 !important;
    }

    .generator-bottom-wrapper-tier-image,
    .generator-bottom-wrapper-tier-video {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .generator-tier-sidebar {
        flex: 0 0 auto !important;
    }

    .generator-bottom-wrapper-tier-image .technical-tray,
    .generator-bottom-wrapper-tier-video .technical-tray,
    .generator-bottom-wrapper-tier-image .floating-input-island,
    .generator-bottom-wrapper-tier-video .floating-input-island {
        width: 100% !important;
        min-width: 0 !important;
    }

    .generator-bottom-wrapper-tier-video .send-action-wrapper {
        width: 100% !important;
        min-width: 0 !important;
    }

    .generator-bottom-wrapper-tier-video .send-btn {
        width: 100% !important;
    }
}