/**
 * Widerrufsformular – plg_system_vmcancellation
 * Stylt die Info-Box und das Formular passend zum VirtueMart/drmair.at-Design
 */

/* ─── Wrapper ──────────────────────────────────────────────────── */
#vmcancel-wrap {
    margin: 24px 0 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;
    color: #333;
}

/* ─── Info-Box ─────────────────────────────────────────────────── */
.vmcancel-infobox {
    border: 1px solid #c8c8c8;
    border-radius: 6px;
    padding: 18px 22px;
    background: #fafafa;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.vmcancel-infobox-text {
    flex: 1 1 260px;
}

.vmcancel-infobox-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
    color: #222;
}

.vmcancel-infobox-text p {
    margin: 0;
    color: #555;
    font-size: 13px;
}

.vmcancel-infobox-action {
    flex-shrink: 0;
}

/* ─── Buttons ──────────────────────────────────────────────────── */
.vmcancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.vmcancel-btn:focus-visible {
    outline: 3px solid #0078d4;
    outline-offset: 2px;
}

/* Primary – passt zum VirtueMart Warenkorb-Button-Stil */
.vmcancel-btn-primary {
    background: #6b2a00;
    color: #fff;
    border-color: #5a2300;
}

.vmcancel-btn-primary:hover {
    background: #8b3600;
    border-color: #7a2e00;
    color: #fff;
}

.vmcancel-btn-primary:active {
    background: #4f1e00;
}

.vmcancel-btn-primary:disabled {
    background: #c49078;
    border-color: #b07060;
    cursor: not-allowed;
}

/* Secondary – Abbrechen */
.vmcancel-btn-secondary {
    background: #fff;
    color: #444;
    border-color: #bbb;
}

.vmcancel-btn-secondary:hover {
    background: #f0f0f0;
    border-color: #999;
}

.vmcancel-btn-secondary:active {
    background: #e4e4e4;
}

/* Spinner inside button */
.vmcancel-btn-spinner {
    display: inline-block;
    animation: vmcancel-spin 1s linear infinite;
}

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

/* ─── Formular-Bereich ─────────────────────────────────────────── */
.vmcancel-form-section {
    border: 1px solid #c8c8c8;
    border-radius: 6px;
    background: #fff;
    padding: 24px 26px 20px;
    margin-top: 16px;
}

.vmcancel-form-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
}

.vmcancel-form-intro {
    font-size: 13px;
    color: #777;
    margin: 0 0 20px;
}

/* ─── Fieldsets ────────────────────────────────────────────────── */
.vmcancel-fieldset {
    border: none;
    margin: 0 0 20px;
    padding: 0;
}

.vmcancel-fieldset-order {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #ebebeb;
}

.vmcancel-legend {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #666;
    margin-bottom: 14px;
    display: block;
}

/* ─── Einzelfelder ─────────────────────────────────────────────── */
.vmcancel-field {
    margin-bottom: 14px;
}

.vmcancel-field-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.vmcancel-field-zip {
    flex: 0 0 120px;
}

.vmcancel-field-city {
    flex: 1 1 200px;
}

.vmcancel-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #444;
    margin-bottom: 5px;
}

.vmcancel-required-star {
    color: #c0392b;
    margin-left: 2px;
}

.vmcancel-optional {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

.vmcancel-input,
.vmcancel-select,
.vmcancel-textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: auto;
}

.vmcancel-input:focus,
.vmcancel-select:focus,
.vmcancel-textarea:focus {
    border-color: #6b2a00;
    box-shadow: 0 0 0 3px rgba(107, 42, 0, 0.12);
    outline: none;
}

.vmcancel-input.vmcancel-error,
.vmcancel-select.vmcancel-error,
.vmcancel-textarea.vmcancel-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.vmcancel-textarea {
    resize: vertical;
    min-height: 100px;
}

.vmcancel-field-hint {
    font-size: 12px;
    color: #777;
    margin: 5px 0 0;
    line-height: 1.45;
}

/* ─── CAPTCHA ──────────────────────────────────────────────────── */
.vmcancel-captcha-wrap {
    margin-top: 10px;
}

/* ─── Alert / Fehlermeldung ────────────────────────────────────── */
.vmcancel-alert {
    padding: 11px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}

.vmcancel-alert-error {
    background: #fdf2f2;
    border: 1px solid #e8a7a7;
    color: #922;
}

.vmcancel-alert-warning {
    background: #fffbf0;
    border: 1px solid #e8d08a;
    color: #775;
}

/* ─── Aktionen ─────────────────────────────────────────────────── */
.vmcancel-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #ebebeb;
}

/* ─── Erfolgsmeldung ───────────────────────────────────────────── */
.vmcancel-success {
    text-align: center;
    padding: 28px 20px;
    color: #1a7a3e;
}

.vmcancel-success-icon {
    width: 52px;
    height: 52px;
    color: #27ae60;
    display: block;
    margin: 0 auto 14px;
}

.vmcancel-success p {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    color: #1a7a3e;
}

/* ─── Transitions ──────────────────────────────────────────────── */
.vmcancel-form-section[hidden] {
    display: none;
}

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 520px) {
    .vmcancel-infobox {
        flex-direction: column;
        align-items: flex-start;
    }

    .vmcancel-field-row {
        flex-direction: column;
    }

    .vmcancel-field-zip {
        flex: 1 1 auto;
    }

    .vmcancel-form-section {
        padding: 18px 14px;
    }

    .vmcancel-actions {
        flex-direction: column;
    }

    .vmcancel-btn {
        justify-content: center;
        width: 100%;
    }
}
