/* T-Shirt Customizer — Frontend CSS */

.tsc-wrapper {
    margin: 24px 0;
    font-family: inherit;
}

.tsc-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 16px;
    color: #222;
}

/* ── Preview mockup ─────────────────────────────────────── */
.tsc-preview-container {
    margin-bottom: 20px;
}

.tsc-mockup-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 380px;
    user-select: none;
}

.tsc-mockup-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.tsc-logo-overlay {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: opacity .2s;
}

.tsc-logo-overlay:active {
    cursor: grabbing;
}

.tsc-logo-overlay img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.tsc-logo-placeholder {
    width: 100%;
    padding-top: 100%;
    position: relative;
    border: 2px dashed rgba(0,0,0,.3);
    border-radius: 4px;
    background: rgba(255,255,255,.4);
}

.tsc-logo-placeholder span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .75em;
    color: rgba(0,0,0,.5);
    line-height: 1.3;
    padding: 4px;
}

.tsc-logo-overlay.tsc-has-logo .tsc-logo-placeholder {
    display: none;
}

/* ── Upload area ────────────────────────────────────────── */
.tsc-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 28px 20px;
    text-align: center;
    background: #fafafa;
    transition: border-color .2s, background .2s;
    cursor: pointer;
}

.tsc-upload-area:hover,
.tsc-upload-area.tsc-drag-over {
    border-color: #333;
    background: #f0f0f0;
}

.tsc-upload-area.tsc-has-file {
    border-color: #5cb85c;
    background: #f5fff5;
}

.tsc-upload-icon {
    font-size: 2em;
    margin-bottom: 8px;
    color: #555;
}

.tsc-upload-label {
    margin: 0 0 6px;
    color: #444;
    font-size: .95em;
}

.tsc-upload-label button {
    background: none;
    border: none;
    color: #0071a1;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.tsc-upload-note {
    margin: 0;
    font-size: .78em;
    color: #888;
}

/* ── Loading ─────────────────────────────────────────────── */
.tsc-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #555;
    font-size: .9em;
}

.tsc-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: tsc-spin .7s linear infinite;
}

@keyframes tsc-spin {
    to { transform: rotate(360deg); }
}

/* ── Logo info bar ───────────────────────────────────────── */
.tsc-logo-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 8px 12px;
    background: #e8f5e9;
    border-radius: 6px;
    border: 1px solid #a5d6a7;
}

.tsc-logo-name {
    font-size: .88em;
    color: #2e7d32;
    font-weight: 500;
    word-break: break-all;
}

.tsc-remove-btn {
    background: none;
    border: none;
    color: #c62828;
    font-size: .82em;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .15s;
    white-space: nowrap;
    margin-left: 10px;
}

.tsc-remove-btn:hover {
    background: rgba(198, 40, 40, .1);
}

/* ── Errore ──────────────────────────────────────────────── */
.tsc-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: #ffebee;
    border-left: 4px solid #c62828;
    border-radius: 4px;
    color: #c62828;
    font-size: .88em;
}

/* ── Admin ordini ────────────────────────────────────────── */
.tsc-admin-logo {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: .9em;
}
