/* TBS Plugin — Frontend Styles */

.tbs-customization-fields {
    margin: 1.5em 0;
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5em;
}

/* Feldgruppen */
.tbs-field-group {
    margin-bottom: 1.5em;
}

.tbs-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4em;
    color: #333;
}

/* Textfeld */
.tbs-text-input {
    width: 100%;
    max-width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.tbs-text-input:focus {
    border-color: #96588a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(150, 88, 138, 0.15);
}

.tbs-char-counter {
    display: block;
    text-align: right;
    font-size: 0.82em;
    color: #888;
    margin-top: 0.2em;
}

/* Maß-Felder */
.tbs-dimension-label {
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #333;
}

.tbs-dimension-label small {
    font-weight: 400;
    color: #666;
    margin-left: 0.3em;
}

.tbs-dimension-inputs {
    display: flex;
    align-items: flex-end;
    gap: 0.75em;
    flex-wrap: wrap;
}

.tbs-dimension-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.tbs-dimension-input-wrap label {
    font-size: 0.88em;
    font-weight: 500;
    color: #555;
    margin-bottom: 0;
}

.tbs-dimension-input {
    width: 110px;
    padding: 0.55em 0.7em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.tbs-dimension-input:focus {
    border-color: #96588a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(150, 88, 138, 0.15);
}

.tbs-unit {
    font-size: 0.82em;
    color: #666;
    margin-left: 0.2em;
    align-self: center;
}

.tbs-dimension-sep {
    font-size: 1.4em;
    color: #999;
    align-self: flex-end;
    padding-bottom: 0.4em;
}

/* Maß-Fehlermeldung */
.tbs-dimension-error {
    margin-top: 0.4em;
    padding: 0.5em 0.75em;
    background: #fdf2f2;
    border: 1px solid #e8b4b4;
    border-radius: 4px;
    color: #c0392b;
    font-size: 0.88em;
}

/* Preisvorschau */
.tbs-price-preview {
    margin-top: 0.75em;
    padding: 0.5em 0.75em;
    background: #f8f4f9;
    border-left: 3px solid #96588a;
    border-radius: 0 4px 4px 0;
    font-size: 0.95em;
    color: #444;
}

.tbs-price-label {
    font-weight: 600;
    margin-right: 0.4em;
}

.tbs-calculated-price {
    font-weight: 700;
    color: #96588a;
}

/* Upload-Feld */
.tbs-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tbs-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex-wrap: wrap;
}

.tbs-upload-btn.button {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    white-space: nowrap;
    cursor: pointer;
}

.tbs-upload-btn.button::before {
    content: '↑';
    font-size: 1em;
    line-height: 1;
}

.tbs-upload-filename {
    font-size: 0.88em;
    color: #666;
    word-break: break-all;
}

.tbs-upload-info {
    margin-top: 0.4em;
}

.tbs-upload-info small {
    color: #888;
    font-size: 0.82em;
}

.tbs-upload-error {
    margin-top: 0.4em;
    padding: 0.5em 0.75em;
    background: #fdf2f2;
    border: 1px solid #e8b4b4;
    border-radius: 4px;
    color: #c0392b;
    font-size: 0.88em;
}

.tbs-upload-preview {
    margin-top: 0.5em;
}

.tbs-upload-preview img {
    display: block;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px;
}

.tbs-file-name {
    font-size: 0.88em;
    color: #27ae60;
}

/* Responsive */
@media (max-width: 480px) {
    .tbs-dimension-inputs {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }

    .tbs-dimension-sep {
        display: none;
    }

    .tbs-dimension-input {
        width: 100%;
    }
}
