
/* VIRAL PHOTO STUDIO - WORKSPACE V4 */

#studio.workspace {
    display: grid;
    gap: 24px;
    align-items: start;
}

.studio-intro {
    grid-column: 1 / -1;
}

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

.studio-intro .eyebrow {
    margin-bottom: 10px;
}

#studio .controls,
#studio .result {
    border-radius: 22px;
    padding: clamp(18px, 3vw, 32px);
    box-shadow: 0 10px 35px #263d3010;
    background: #fff;
    min-width: 0;
}

/* STEP HEADINGS */

#studio .studio-step {
    font-family: system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin: 12px 0 16px;
}

#studio .controls h2:not(:first-child) {
    margin-top: 28px;
}

/* UPLOAD PHOTO */

#studio .upload-zone {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 10px;
    padding: 30px 16px;
    border: 2px dashed #83ad90;
    border-radius: 20px;
    background: #f1f8f2;
    cursor: pointer;
    text-align: center;
    min-height: 220px;
    box-sizing: border-box;
}

#studio .upload-zone:focus-within,
#studio .upload-zone.dragging {
    outline: 3px solid #77a88a;
    outline-offset: 3px;
}

#studio .upload-icon {
    display: grid;
    place-items: center;
    font-size: 32px;
    color: #176b47;
    background: #dceee0;
    border-radius: 20px;
    width: 76px;
    height: 76px;
}

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

#studio .upload-zone small,
#studio #fileName {
    font-size: 16px;
    line-height: 1.5;
    color: #53665a;
    overflow-wrap: anywhere;
    max-width: 100%;
}

#studio #fileName {
    background: #fff;
    padding: 9px 14px;
    border: 1px solid #dce6dc;
    border-radius: 10px;
    font-weight: 600;
}

#studio #photo {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* SELECTED PHOTO STYLE */

#studio .look-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px;
    background: #f1f7f2;
    border: 1px solid #dce6dc;
    border-radius: 16px;
}

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

#studio .look-summary p {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

#studio .look-summary a {
    font-size: 16px;
    color: #176b47;
    font-weight: 700;
    text-decoration: underline;
}

#studio #theme,
#studio #format,
#studio #nyName {
    width: 100%;
    min-height: 56px;
    font-size: 17px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #b8cbbd;
    box-sizing: border-box;
}

/* PHOTO FORMAT SELECTION */

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

#studio .format-tiles button {
    padding: 15px 8px;
    background: #fff;
    color: #183c2b;
    border: 2px solid #dce6dc;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    min-height: 62px;
    cursor: pointer;
    white-space: normal;
}

#studio .format-tiles button:hover {
    background: #edf5ef;
    border-color: #77a88a;
}

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

/* PRIVACY AND CONSENT */

#studio .studio-consent {
    font-size: 16px;
    line-height: 1.7;
    margin: 20px 0;
    color: #53665a;
}

/* GENERATE BUTTON */

#studio #generate {
    background: #176b47;
    border-radius: 16px;
    padding: 18px 14px;
    min-height: 64px;
    font-size: 20px;
    font-weight: 700;
    width: 100%;
    color: #fff;
}

#studio #status {
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* PHOTO PREVIEW */

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

#studio .preview-pane {
    position: relative;
    min-height: 280px;
    background: #f4f7f3;
    border: 1px solid #dce6dc;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#studio .preview-pane small {
    position: absolute;
    top: 12px;
    left: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #176b47;
    background: #fff;
    padding: 7px 10px;
    border-radius: 8px;
    z-index: 1;
}

#studio .preview-empty {
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    color: #53665a;
    padding: 25px 5px;
}

#studio .preview-pane:has(img:not([hidden])) .preview-empty,
#studio .preview-pane:has(canvas:not([hidden])) .preview-empty {
    display: none;
}

#studio .preview-pane img,
#studio .preview-pane canvas {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    margin: 28px 0 0;
    border-radius: 12px;
}

/* DOWNLOAD AND SHARE BUTTONS */

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

#studio .actions button {
    border-radius: 14px;
    padding: 14px 10px;
    font-size: 17px;
    font-weight: 600;
    min-height: 58px;
    white-space: normal;
}

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

/* MOBILE RESPONSIVE */

@media (max-width: 760px) {

    #studio.workspace {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    #studio .controls,
    #studio .result {
        padding: 16px;
    }

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

    #studio .upload-zone {
        min-height: 220px;
        padding: 25px 12px;
    }

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

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

    #studio .format-tiles button {
        min-height: 60px;
        font-size: 16px;
    }

    #studio .preview-pane {
        min-height: 210px;
    }

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

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

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

@media (max-width: 360px) {

    #studio .preview-grid {
        grid-template-columns: 1fr;
    }

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