/**
 * Shopware 5 Widerruf-Modul - Stylesheet
 * Version: 1.0
 *
 * Eigenständiges CSS für Widerruf-Funktionalität
 */

/* Footer-Link Styling */
.navigation--link.js-widerruf-footer-link {
    background-color: #56af31;
    width: max-content;
    padding: 0.5rem;
    margin-top: 1rem;
    border-radius: 3px;
    color: white;
}

.navigation--link.js-widerruf-footer-link:hover {
    color: inherit;
    opacity: 0.9;
}

/* Modal Overlay */
.widerruf-modal-open {
    overflow: hidden;
}

.widerruf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.widerruf-modal {
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* Modal Header & Footer */
.widerruf-modal-header,
.widerruf-modal-footer {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e5e5;
}

.widerruf-modal-footer {
    border-bottom: 0;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.widerruf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widerruf-modal-header h3 {
    margin: 0;
}

.widerruf-close {
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    color: #999;
}

.widerruf-close:hover {
    color: #333;
}

/* Modal Body */
.widerruf-modal-body {
    padding: 22px;
}

.widerruf-order-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 4px;
}

.widerruf-customer-note {
    margin-bottom: 24px;
}

.widerruf-customer-note textarea {
    width: 100%;
    min-height: 90px;
    margin-top: 8px;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

/* Artikel-Liste */
.widerruf-items h4 {
    margin-top: 0;
    margin-bottom: 16px;
}

.widerruf-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.widerruf-item-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    cursor: pointer;
}

.widerruf-item-check input[type="checkbox"] {
    cursor: pointer;
}

.widerruf-item-name {
    font-weight: 700;
    margin-bottom: 12px;
}

.widerruf-item-meta {
    display: grid;
    grid-template-columns: 160px 1fr 1fr;
    gap: 16px;
    align-items: end;
}

.widerruf-item-meta label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.widerruf-item-meta input[type="number"] {
    width: 100%;
    max-width: 100px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.widerruf-item-meta small {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 12px;
}

/* Widerruf-Button in Bestellübersicht */
.js-widerruf-btn {
    background: #d9534f !important;
    border-color: #d9534f !important;
    color: #fff !important;
}

.js-widerruf-btn:hover {
    opacity: 0.9;
}

/* Info-Modal */
.widerruf-info-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.widerruf-info-modal {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widerruf-info-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e5e5;
}

.widerruf-info-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.widerruf-info-body {
    padding: 24px;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.widerruf-info-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

.widerruf-info-footer .btn {
    min-width: 100px;
    text-align: center;
}

/* Formular-Styles für Gast-Widerruf */
.widerruf-form-row {
    margin-bottom: 16px;
}

.widerruf-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.widerruf-form-row input,
.widerruf-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.widerruf-form-row input:focus,
.widerruf-form-row textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.widerruf-form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .widerruf-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .widerruf-order-data,
    .widerruf-item-meta,
    .widerruf-form-row-group {
        grid-template-columns: 1fr;
    }

    .widerruf-modal-footer {
        flex-direction: column-reverse;
    }

    .widerruf-modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .widerruf-modal-overlay {
        padding: 0;
    }

    .widerruf-modal-header,
    .widerruf-modal-body,
    .widerruf-modal-footer {
        padding: 16px;
    }
}