
/* VIRAL PHOTO STUDIO - PREMIUM WORKSPACE V4 */

#studio.workspace {
    background: #f8faf7;
    border: 1px solid #dce6dc;
    border-radius: 28px;
    padding: clamp(16px, 3vw, 40px);
    gap: 26px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    box-sizing: border-box;
    scroll-margin-top: 100px;
}

#studio .studio-intro {
    padding: 12px 0 24px;
    border-bottom: 1px solid #dce6dc;
}

#studio .studio-intro h2 {
    font-size: clamp(32px, 4vw, 54px);
    letter-spacing: -.035em;
    line-height: 1.15;
    color: #183c2b;
}

#studio .studio-intro p {
    font-size: 18px;
    line-height: 1.7;
    color: #53665a;
}

#studio .studio-intro .eyebrow {
    font-size: 13px;
    font-weight: 700;
}

#studio .controls,
#studio .result {
    min-width: 0;
    background: #fff;
    border: 1px solid #dce6dc;
    border-radius: 22px;
    box-shadow: 0 12px 32px #203d2510;
    padding: clamp(18px, 2.5vw, 30px);
}

/* STEP HEADINGS */

#studio .studio-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
    color: #183c2b;
    margin: 24px 0 15px;
}

#studio .studio-step:first-child {
    margin-top: 0;
}

#studio .studio-step span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #176b47;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    flex: none;
}

/* PHOTO UPLOAD */

#studio .upload-zone {
    background: #f0f8f2;
    border: 2px dashed #77a88a;
    border-radius: 20px;
    padding: 30px 16px;
    min-height: 220px;
    cursor: pointer;
    text-align: center;
    transition: background .2s, border-color .2s;
}

#studio .upload-zone:hover,
#studio .upload-zone.dragging {
    background: #e3f2e7;
    border-color: #176b47;
    box-shadow: 0 0 0 4px #176b4712;
}

#studio .upload-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    border-radius: 22px;
    background: #d9ecdf;
    color: #176b47;
}

#studio svg {
    width: 24px;
    height: 24px;
    flex: none;
}

#studio .upload-icon svg {
    width: 36px;
    height: 36px;
}

#studio .upload-zone strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: #176b47;
}

#studio .upload-zone small {
    display: block;
    font-size: 15px;
    margin-top: 8px;
    color: #53665a;
}

#studio #fileName {
    display: block;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* SELECT PHOTO STYLE */

#studio .look-summary {
    background: #f1f7f2;
    border: 1px solid #dce8de;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 14px;
    gap: 12px;
}

#studio .look-summary img {
    width: 80px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

#studio #selectedLook {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#studio .look-summary a {
    font-size: 15px;
    font-weight: 700;
    color: #176b47;
}

#studio select,
#studio #nyName {
    width: 100%;
    min-height: 56px;
    padding: 12px;
    border: 1px solid #b8cbbd;
    border-radius: 12px;
    font-size: 17px;
    background: #fff;
    color: #183c2b;
    box-sizing: border-box;
}

/* OUTPUT FORMAT */

#studio .format-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

#studio .format-tiles button {
    min-height: 58px;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    white-space: normal;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

#studio .format-tiles button:hover {
    border-color: #176b47;
}

#studio .format-tiles button.active,
#studio .format-tiles button[aria-pressed="true"] {
    background: #176b47;
    border-color: #176b47;
    color: #fff;
}

/* PRIVACY AND CONSENT */

#studio .studio-consent {
    font-size: 15px;
    line-height: 1.75;
    color: #53665a;
    margin: 18px 0;
}

#studio .studio-consent a {
    color: #176b47;
    font-weight: 700;
    text-decoration: underline;
}

#studio .studio-consent label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 15px;
    background: #f1f8f3;
    border: 2px solid #a5c6ad;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
    color: #183c2b;
    cursor: pointer;
}

#studio .studio-consent input#consent {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    display: inline-block !important;
    position: static !important;
    opacity: 1 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    flex: 0 0 30px;
    margin: 0;
    accent-color: #176b47;
    cursor: pointer;
}

#studio .studio-consent label:has(input:checked) {
    background: #e0f2e5;
    border-color: #176b47;
}

#studio .studio-consent label:focus-within {
    outline: 3px solid #176b4733;
    outline-offset: 3px;
}

/* GENERATE PHOTO BUTTON */

#studio #generate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 18px 14px;
    background: linear-gradient(135deg, #218858, #125b3b);
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
    box-shadow: 0 8px 22px #176b4730;
    cursor: pointer;
}

#studio #generate svg {
    width: 27px;
    height: 27px;
}

#studio #generate:disabled {
    opacity: .65;
    cursor: not-allowed;
}

#studio #status {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
    overflow-wrap: anywhere;
    margin-top: 14px;
}

/* PHOTO RESULT */

#studio .studio-result-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    line-height: 1.4;
    color: #183c2b;
}

#studio .result .muted {
    font-size: 16px;
    line-height: 1.6;
}

#studio .preview-pane {
    background: #f5f8f5;
    border: 1px solid #dce6dc;
    border-radius: 14px;
    min-height: clamp(180px, 23vw, 320px);
}

#studio .preview-pane small {
    font-size: 13px;
    font-weight: 700;
    color: #294b36;
    border: 1px solid #dce6dc;
}

#studio .preview-empty {
    font-size: 16px;
    line-height: 1.6;
}

#studio #preview,
#studio #canvas {
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
}

/* DOWNLOAD AND SHARE */

#studio .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

#studio .actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 12px;
    white-space: normal;
}

#studio #download:not(:disabled) {
    background: #176b47;
    border-color: #176b47;
    color: #fff;
}

#studio .actions button:not(:disabled):hover,
#studio #generate:not(:disabled):hover {
    box-shadow: 0 6px 16px #294b3625;
}

#studio button:focus-visible,
#studio select:focus-visible,
#studio input:focus-visible {
    outline: 3px solid #77a88a;
    outline-offset: 3px;
}

/* MOBILE RESPONSIVE */

@media (max-width: 760px) {

    #studio.workspace {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 12px;
        border-radius: 18px;
        scroll-margin-top: 80px;
    }

    #studio .studio-intro {
        padding: 12px 5px 18px;
    }

    #studio .studio-intro h2 {
        font-size: 34px;
    }

    #studio .studio-intro p {
        font-size: 17px;
    }

    #studio .controls,
    #studio .result {
        padding: 16px;
        border-radius: 18px;
    }

    #studio .studio-step {
        font-size: 20px;
        margin-top: 26px;
    }

    #studio .upload-zone {
        min-height: 210px;
        padding: 24px 12px;
    }

    #studio .upload-zone strong {
        font-size: 21px;
    }

    #studio .studio-consent label {
        font-size: 17px;
        padding: 16px 12px;
    }

    #studio #generate {
        min-height: 66px;
        font-size: 19px;
    }

    #studio .preview-grid {
        gap: 10px;
    }

    #studio .preview-pane {
        min-height: 180px;
        padding: 8px;
    }

    #studio .actions {
        grid-template-columns: minmax(0, 1fr);
    }

    #studio .actions button {
        min-height: 58px;
        font-size: 17px;
    }

    #studio #reset {
        grid-column: auto;
    }
}

@media (max-width: 360px) {
    #studio .preview-grid {
        grid-template-columns: 1fr;
    }

    #studio .studio-step {
        font-size: 18px;
    }

    #studio .format-tiles button {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #studio * {
        transition: none !important;
        animation: none !important;
    }
}
