/**
 * director.css — Scene Director Modal
 * 4-step wizard: Estilo → Sujeto → Vestimenta → Audio/Textos
 * Converted from Tailwind mockup to vanilla CSS (Inter font)
 * Architecture: ZERO inline CSS. External only.
 */

/* ═══ OVERLAY ═══ */
.director-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.director-overlay.open {
    display: flex;
}

/* ═══ MODAL CONTAINER ═══ */
.director-modal {
    width: 100%;
    max-width: 540px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    max-height: 95vh;
    position: relative;
    overflow: hidden;
    transition: max-width 0.4s ease;
}

/* Expand for slides 2-4 (2 columns) */
.director-modal.wide {
    max-width: 780px;
}

/* ═══ HEADER ═══ */
.director-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    flex-shrink: 0;
    background: #0a0a0a;
    z-index: 10;
}

.director-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.director-title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 900;
    color: #fff;
}

.director-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.director-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ═══ STEP NAV ═══ */
.director-steps {
    display: flex;
    gap: 4px;
}

.director-step {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.director-step-label {
    font-family: 'Inter', sans-serif;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
    margin-bottom: 4px;
    transition: opacity 0.3s;
}

.director-step-bar {
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s;
}

/* States */
.director-step.current .director-step-label { opacity: 1; }
.director-step.current .director-step-bar  { background: #fff; }
.director-step.done .director-step-label    { opacity: 0.5; }
.director-step.done .director-step-bar      { background: rgba(255, 255, 255, 0.4); }
.director-step.locked .director-step-label  { opacity: 0.18; }
.director-step.locked .director-step-bar    { background: rgba(255, 255, 255, 0.15); }
.director-step.locked { cursor: default; pointer-events: none; }

/* ═══ SLIDER ═══ */
.director-slider-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.director-slider {
    display: flex;
    width: 400%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.director-slide {
    width: 25%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

.director-slide-content {
    padding: 20px;
}

/* ═══ SLIDE FOOTER ═══ */
.director-slide-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0a0a;
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.director-btn-back {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    color: #000;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.director-btn-back:hover {
    background: rgba(255, 255, 255, 0.9);
}

.director-btn-next {
    flex: 1;
    background: #fff;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.director-btn-next:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Final "Generar Escena" button */
.director-btn-generate {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #fff;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.director-btn-generate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 10%, rgba(130, 190, 255, 0.7) 40%, rgba(255, 150, 190, 0.7) 60%, transparent 90%);
    background-size: 200% 200%;
    animation: directorPastel 4s ease-in-out infinite;
    pointer-events: none;
}

.director-btn-generate span {
    position: relative;
    z-index: 2;
}

.director-btn-generate:hover {
    transform: scale(1.01);
}

@keyframes directorPastel {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═══ SECTION TITLE ═══ */
.dir-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dir-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    margin: 0;
}

.dir-section-reset {
    font-family: 'Inter', sans-serif;
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.2s;
}

/* Active — has changes, invite click (white selected look) */
.dir-section-reset:not(.disabled) {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.07);
}

.dir-section-reset:not(.disabled):hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Disabled — no changes, subtle but visible */
.dir-section-reset.disabled {
    cursor: default;
    pointer-events: none;
}

/* ═══ SELECT ROW ═══ */
.dir-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dir-row-label {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
}

.dir-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══ CUSTOM SELECT ═══ */
.dir-sel {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 28px;
    position: relative;
}

.dir-sel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.dir-sel-value {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    flex: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-sel-arrow {
    font-size: 6px;
    opacity: 0.3;
    color: #fff;
}

/* ═══ DROPDOWN MENU (inline — hidden, not used for display) ═══ */
.dir-menu {
    display: none !important;
}

/* ═══ FLOATING DROPDOWN (portal — direct child of overlay) ═══ */
.dir-float-menu {
    position: absolute;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    z-index: 200;
    min-width: 140px;
    padding: 3px;
    display: none;
}

.dir-float-menu.open { display: block; }

.dir-float-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.12s;
}

.dir-float-menu button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
}

.dir-float-menu button.cur {
    color: #fff;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.05);
}

/* + Ingresar Nueva — always white */
#dir-loc-new {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ═══ PILLS ═══ */
.dir-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
}

.dir-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.7);
}

.dir-pill.active {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.dir-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ═══ COLOR SWATCHES ═══ */
.dir-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: calc(7 * 19px);
    padding: 2px 0;
}

.dir-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: all 0.15s;
    opacity: 0.3;
}

.dir-swatches:hover .dir-dot { opacity: 0.85; }
.dir-dot:hover { transform: scale(1.2); }

.dir-dot.active {
    opacity: 1 !important;
    border-color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

/* ═══ TOGGLE ═══ */
.dir-toggle {
    width: 30px;
    height: 16px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    position: relative;
    transition: all 0.25s;
    flex-shrink: 0;
}

.dir-toggle.on {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
}

.dir-toggle-knob {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.dir-toggle.on .dir-toggle-knob {
    transform: translateX(14px);
}

/* ═══ GARMENT GROUP ═══ */
.dir-garment {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
}

.dir-garment.locked {
    opacity: 0.35;
    pointer-events: none;
    border-style: dashed;
}

.dir-garment-title {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.dir-garment-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.dir-garment-row:last-child { margin-bottom: 0; }

.dir-garment-label {
    font-family: 'Inter', sans-serif;
    font-size: 7px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    width: 40px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ═══ GARMENTS GRID ═══ */
.dir-garments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

/* ═══ TWO COLUMNS ═══ */
.dir-columns {
    display: flex;
    gap: 16px;
}

.dir-col {
    flex: 1;
}

/* ═══ TEXT INPUT ═══ */
.dir-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: border-color 0.2s;
    outline: none;
}

.dir-input::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.dir-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.dir-input.disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* ═══ MARKET INFO ═══ */
.dir-market-info {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.dir-market-info strong {
    color: #fff;
    font-weight: 900;
}

/* ═══ LOCKED ROW ═══ */
.dir-row.locked {
    opacity: 0.35;
}

.dir-locked-value {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
}

/* ═══ SCROLLBAR ═══ */
.director-slide::-webkit-scrollbar { width: 3px; }
.director-slide::-webkit-scrollbar-track { background: transparent; }
.director-slide::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

/* ═══ MOBILE ═══ */
@media (max-width: 480px) {
    .director-modal {
        max-width: 100% !important;
        max-height: 100vh;
        border-radius: 0;
    }

    .director-overlay {
        padding: 0;
    }

    .dir-columns {
        flex-direction: column;
        gap: 0;
    }

    .dir-garments-grid {
        grid-template-columns: 1fr;
    }
}
