/*
 * Widget "fuer Software-Provider" auf den Anbieterseiten.
 * Eigene Klassen mit Praefix .shv-, weil das Tailwind-Bundle fertig gebaut
 * vorliegt und nicht um neue Utilities erweitert werden kann.
 */

.shv-trigger {
    /* Fest positioniert unterhalb der Kopfleiste, damit der Button unabhaengig
       davon ist, wie und wann die React-App ihr Markup aufbaut. */
    position: fixed;
    top: 6rem;
    right: 1rem;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.7rem;
    line-height: 1.1;
    color: #4a5568;
    white-space: nowrap;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shv-trigger:hover,
.shv-trigger:focus-visible {
    border-color: #2b579a;
    box-shadow: 0 1px 6px rgba(43, 87, 154, 0.18);
    outline: none;
}

.shv-trigger svg {
    width: 1.05rem;
    height: 1.05rem;
    flex: none;
}

@media (max-width: 640px) {
    .shv-trigger {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        padding: 0.5rem;
    }

    .shv-trigger span {
        display: none;
    }
}

/* --- Dialog --- */

.shv-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
}

.shv-dialog {
    width: 100%;
    max-width: 34rem;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    font-family: inherit;
    color: #1f2937;
    line-height: 1.5;
}

.shv-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.75rem;
}

.shv-head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.shv-close {
    flex: none;
    width: 2rem;
    height: 2rem;
    background: none;
    border: 0;
    border-radius: 0.375rem;
    font-size: 1.35rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
}

.shv-close:hover {
    background: #f1f5f9;
}

.shv-body {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9rem;
}

.shv-body p {
    margin: 0 0 0.85rem;
}

.shv-note {
    padding: 0.75rem 0.9rem;
    background: #f4f7f2;
    border-left: 3px solid #7cb342;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}

.shv-field {
    margin-bottom: 0.75rem;
}

.shv-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.shv-field input,
.shv-field textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1f2937;
    background: #fff;
    box-sizing: border-box;
}

.shv-field input:focus,
.shv-field textarea:focus {
    border-color: #2b579a;
    outline: 2px solid rgba(43, 87, 154, 0.15);
}

.shv-field textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.shv-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.shv-error {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.8rem;
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    border-radius: 0.25rem;
    color: #991b1b;
    font-size: 0.85rem;
}

.shv-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.25rem 1.5rem 1.5rem;
}

.shv-btn {
    padding: 0.55rem 1.1rem;
    border: 0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.shv-btn-primary {
    background: #7cb342;
    color: #fff;
}

.shv-btn-primary:hover:not(:disabled) {
    background: #6ba238;
}

.shv-btn-primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.shv-btn-ghost {
    background: #f1f5f9;
    color: #374151;
}

.shv-btn-ghost:hover {
    background: #e2e8f0;
}

.shv-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    margin-bottom: 0.85rem;
    background: #eef2f7;
    border: 1px solid #d7dfe9;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b579a;
    cursor: pointer;
}

.shv-copy:hover {
    background: #e3eaf3;
}

.shv-file {
    display: block;
    padding: 1.1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
}

.shv-file:hover {
    border-color: #7cb342;
    color: #374151;
}

.shv-file input {
    display: none;
}

.shv-filename {
    margin-top: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    word-break: break-all;
}

.shv-success {
    padding: 1rem 0;
    text-align: center;
}

.shv-success svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #7cb342;
}
