/* =========================================================
   GRADIENT ENGINE BASE
========================================================= */

.screen-engine-gradient {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
}

/* =========================================================
   PREVIEW (IDENTICAL UX TO SOLID)
   BUT NOW GRADIENT RENDER TARGET
========================================================= */

.screen-engine-gradient__preview {
    width: 100%;
    aspect-ratio: 16 / 9;

    border-radius: 16px;

    background: linear-gradient(90deg, #000000, #ffffff);

    position: relative;
    overflow: hidden;

    cursor: pointer;

    border: none;
    box-shadow: none;

    transition: none;
}

/* =========================================================
   CONTROLS LAYOUT
========================================================= */

.screen-engine-gradient__controls {
    display: grid;
    gap: 16px;
    margin-top: 16px;

    width: 100%;
    box-sizing: border-box;
}

/* =========================================================
   CARD BASE (shared with Solid visual system)
========================================================= */

.screen-engine-gradient__card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;

    padding: 16px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    text-align: left;

    width: 100%;
    box-sizing: border-box;
}

/* =========================================================
   CARD TITLE
========================================================= */

.screen-engine-gradient__card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.2px;
}

/* =========================================================
   CONTROL GROUP
========================================================= */

.screen-engine-gradient__control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;

    width: 100%;
    box-sizing: border-box;
}

.screen-engine-gradient__control-group label {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.65);
}

/* =========================================================
   COLOR PICKERS (A + B)
========================================================= */

.screen-engine-gradient__color-picker-wrapper {
    width: 100%;
}

.screen-engine-gradient__color-picker {
    width: 100%;
    height: 56px;

    appearance: none;
    -webkit-appearance: none;

    border: none;
    background: transparent;

    cursor: pointer;
}

.screen-engine-gradient__color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

.screen-engine-gradient__color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 12px;
}

/* =========================================================
   HEX + COPY (shared behavior)
========================================================= */

.screen-engine-gradient__hex-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.screen-engine-gradient__hex-input {
    flex: 1;
    min-width: 0;

    height: 38px;
    padding: 0 6px;

    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);

    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 16px;

    outline: none;
}

.screen-engine-gradient__hex-input:focus {
    border-color: rgba(0,0,0,0.3);
}

.screen-engine-gradient__copy {
    height: 38px;
    padding: 0 10px;

    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);

    background: #fafafa;
    color: rgba(0,0,0,0.7);

    cursor: pointer;

    font-size: 12px;
    font-weight: 500;
}

/* =========================================================
   DIRECTION CONTROLS
========================================================= */

.screen-engine-gradient__direction {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.screen-engine-gradient__direction button {
    flex: 1;
    min-width: 80px;

    height: 38px;

    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);

    background: #fff;

    cursor: pointer;

    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,0.7);
}

.screen-engine-gradient__direction button[data-active="true"] {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* =========================================================
   ANGLE INPUT
========================================================= */

.screen-engine-gradient__angle {
    width: 100%;
    height: 42px;

    padding: 0 6px;

    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);

    font-size: 16px;
}

/* =========================================================
   SHARED INPUTS (resolution, numbers, etc.)
========================================================= */

.screen-engine-gradient__select,
.screen-engine-gradient__number-input {
    width: 100%;
    height: 42px;

    padding: 0 6px;

    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);

    font-size: 16px;
    background: #fff;
}

/* =========================================================
   DIMENSIONS ROW (IDENTICAL BEHAVIOR)
========================================================= */

.screen-engine-gradient__dimensions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.screen-engine-gradient__dimension-separator {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(0,0,0,0.45);
}

/* =========================================================
   DOWNLOAD BUTTON
========================================================= */

.screen-engine-gradient__download-button {
    width: 100%;
    height: 46px;

    border: none;
    border-radius: 12px;

    background: #111;
    color: #fff;

    font-weight: 600;
    font-size: 0.95rem;

    cursor: pointer;
}

.screen-engine-gradient__download-button:hover {
    opacity: 0.92;
}

/* =========================================================
   SHORTCUTS (IDENTICAL VISUAL SYSTEM)
========================================================= */

.screen-engine-gradient__shortcuts {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 6px;

    display: flex;
    justify-content: center;
}

.screen-engine-gradient__shortcuts-content {
    font-size: 0.8rem;
    line-height: 1.4;

    color: rgba(0, 0, 0, 0.55);
    text-align: center;

    font-weight: 500;
}

.screen-engine-gradient__shortcuts-content strong {
    color: rgba(0, 0, 0, 0.75);
    font-weight: 600;
}

/* =========================================================
   FULLSCREEN SYSTEM (SHARED LOGIC STYLE)
========================================================= */

.screen-engine-gradient--fullscreen {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    z-index: 999999;

    background: #000;
}

/* preview expands in fullscreen */
.screen-engine-gradient--fullscreen
.screen-engine-gradient__preview {
    width: 100%;
    height: 100vh;
    border-radius: 0 !important;
}

/* hide controls in fullscreen */
.screen-engine-gradient--fullscreen
.screen-engine-gradient__controls {
    display: none !important;
}

/* =========================================================
   UI HIDE STATE
========================================================= */

.screen-engine-gradient--ui-hidden
.screen-engine-gradient__hover-text,
.screen-engine-gradient--ui-hidden
.screen-engine-gradient__fullscreen-icon {
    opacity: 0;
    pointer-events: none;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    .screen-engine-gradient__dimensions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .screen-engine-gradient__direction button {
        min-width: 100%;
    }

    .screen-engine-gradient__shortcuts-content {
        font-size: 0.75rem;
    }
}