/* Steag.ro product customization uploader.
   Palette matches the product page: navy #131a65 (theme primary), green #2e7d32
   (the price/success green from the steagpricerange feature), lavender card tones. */

.steag-upload {
    margin-top: 0.25rem;
}

/* The native input stays in the flow for form semantics but is visually hidden;
   the <label> zone is the visible control. Kept focusable so keyboard users see
   the focus ring on the zone via :focus-within. */
.steag-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.steag-upload__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 1.75rem 1rem;
    border: 2px dashed #c3c8e6;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    cursor: pointer;
    margin-bottom: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.steag-upload__zone:hover,
.steag-upload__zone--over,
.steag-upload:focus-within .steag-upload__zone {
    border-color: #131a65;
    background: #f3f5fd;
}

.steag-upload__zone--over {
    border-style: solid;
}

.steag-upload__icon {
    color: #131a65;
}

.steag-upload__title {
    font-weight: 600;
    color: #232323;
}

.steag-upload__title em {
    font-style: normal;
    color: #131a65;
    text-decoration: underline;
}

.steag-upload__hint {
    font-size: 0.8125rem;
    color: #777777;
}

.steag-upload__optional {
    font-size: 0.75rem;
    color: #9a9a9a;
    text-transform: lowercase;
}

/* Chosen-file preview row (before saving) */
.steag-upload__preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #c3c8e6;
    border-radius: 12px;
    background: #ffffff;
}

.steag-upload__thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f0f1f6;
    overflow: hidden;
}

.steag-upload__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.steag-upload__thumb-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #131a65;
}

.steag-upload__fileinfo {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.steag-upload__filename {
    font-weight: 600;
    color: #232323;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.steag-upload__filesize {
    font-size: 0.8125rem;
    color: #777777;
}

.steag-upload__status {
    font-size: 0.8125rem;
    color: #131a65;
    font-weight: 600;
}

.steag-upload__progress {
    display: block;
    width: 100%;
    max-width: 260px;
    height: 6px;
    margin-top: 0.25rem;
    border-radius: 3px;
    background: #e4e6f2;
    overflow: hidden;
}

.steag-upload__progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: 3px;
    background: #131a65;
    transition: width 0.15s ease;
}

.steag-upload__remove {
    margin-left: auto;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f0f1f6;
    color: #555555;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.steag-upload__remove:hover {
    background: #fdecea;
    color: #c62828;
}

.steag-upload__error {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #c62828;
}

/* Saved state (server-confirmed customization) */
.steag-upload__saved {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cde8d2;
    border-radius: 12px;
    background: #e6f4ea;
}

.steag-upload__saved-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #ffffff;
}

.steag-upload__saved-label {
    font-weight: 600;
    color: #1e7e34;
}

.steag-upload__saved-remove {
    margin-left: auto;
    color: #777777;
}

.steag-upload__saved-remove:hover {
    color: #c62828;
}

/* JS mode (class set by steag-upload.js): uploads are automatic on selection, so the
   manual save button is pure noise -- it stays in the DOM only for no-JS visitors. */
.steag-upload-js .product-customization-custom-steag-submit {
    display: none;
}

/* Footer add-to-cart while a print file is still in flight: the customization is not
   bound yet, adding now would create an order without its design. */
.steag-upload-cart-waiting {
    opacity: 0.55;
    cursor: wait !important;
}
