.wh-widerruf-wrap {
    max-width: 640px;
    margin: 0;
}

.wh-widerruf-form,
.wh-widerruf-message {
    border: 1px solid #d7d7d7;
    padding: 20px;
    background: #ffffff;
    box-sizing: border-box;
}

.wh-widerruf-form h2,
.wh-widerruf-message h2 {
    margin-top: 0;
}

.wh-widerruf-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.wh-widerruf-form input[type="text"],
.wh-widerruf-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    box-sizing: border-box;
}

.wh-widerruf-form button,
.wh-widerruf-trigger {
    cursor: pointer;
    padding: 10px 16px;
    text-decoration: none;
    display: inline-block;
    border: 1px solid transparent;
}

.wh-widerruf-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.wh-widerruf-legal-link {
    color: #cc0000;
    text-decoration: underline;
}

.wh-widerruf-summary {
    margin: 16px 0;
    padding: 12px;
    background: #f7f7f7;
}

.wh-widerruf-confirm-items {
    margin-top: 12px;
}

.wh-widerruf-confirm-items ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.wh-widerruf-confirm-items li {
    word-break: break-word;
}

.wh-widerruf-error {
    border-color: #cc0000;
}

.wh-widerruf-success {
    border-color: #2b7a0b;
}

.wh-widerruf-overlay,
.wh-widerruf-legal-overlay {
    display: none;
    position: fixed;
    inset: 0;
}

.wh-widerruf-overlay {
    z-index: 999999;
}

.wh-widerruf-legal-overlay {
    z-index: 1000001;
}

.wh-widerruf-overlay.is-open,
.wh-widerruf-legal-overlay.is-open {
    display: block;
}

.wh-widerruf-backdrop,
.wh-widerruf-legal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.wh-widerruf-modal,
.wh-widerruf-legal-modal {
    position: relative;
    z-index: 2;
    width: min(700px, calc(100vw - 30px));
    margin: 60px auto;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.wh-widerruf-legal-modal {
    width: min(960px, calc(100vw - 30px));
}

.wh-widerruf-close-button {
    position: absolute;
  top: 0px;
  right: 0px;
  font-size: 28px;
  line-height: 1;
  background: #E81123;
  color: #333333;
  border: 0;
  padding: 4px 8px 4px 8px;

}

.wh-widerruf-legal-content-wrap {
    max-height: calc(100vh - 140px);
    overflow: auto;
    padding: 24px;
}

.wh-widerruf-legal-content-wrap h2 {
    margin-top: 0;
}

@media (max-width: 767px) {
    .wh-widerruf-modal,
    .wh-widerruf-legal-modal {
        width: calc(100vw - 20px);
        margin: 30px auto;
    }

    .wh-widerruf-legal-content-wrap {
        max-height: calc(100vh - 90px);
        padding: 18px;
    }
}

.wh-widerruf-field-hint {
    display: block;
    margin-top: 6px;
    color: #555555;
    font-size: 14px;
    line-height: 1.4;
}

.wh-widerruf-order-list {
    display: grid;
    gap: 14px;
    margin: 18px 0;
}

.wh-widerruf-order-card {
    border: 1px solid #d7d7d7;
    padding: 14px;
    background: #f7f7f7;
    box-sizing: border-box;
}

.wh-widerruf-order-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wh-widerruf-order-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.wh-widerruf-order-card-items {
    margin: 10px 0 14px 0;
}

.wh-widerruf-order-card-items ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.wh-widerruf-order-selection-actions {
    margin-top: 18px;
}
.wh-widerruf-modal {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.wh-widerruf-form-select-order .wh-widerruf-order-list {
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    padding-right: 6px;
}

.wh-widerruf-order-card-items li {
    word-break: break-word;
}

@media (max-width: 767px) {
    .wh-widerruf-modal {
        max-height: calc(100vh - 40px);
    }

    .wh-widerruf-form-select-order .wh-widerruf-order-list {
        max-height: calc(100vh - 320px);
    }
}


/* Auswahlfenster optisch sauber halten und scrollbar machen */
.wh-widerruf-modal {
    max-height: calc(100vh - 32px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.wh-widerruf-form-select-order {
    max-height: calc(100vh - 32px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-list {
    max-height: calc(100vh - 340px) !important;
    min-height: 180px;
    overflow-y: auto !important;
    padding: 0 8px 0 0 !important;
    margin: 18px 0 !important;
    display: block !important;
    border-top: 1px solid #d7d7d7;
    border-bottom: 1px solid #d7d7d7;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card {
    border: 0 !important;
    border-bottom: 1px solid #d7d7d7 !important;
    background: #f7f7f7 !important;
    padding: 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card:last-child {
    border-bottom: 0 !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-bottom: 8px !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card-meta {
    display: flex !important;
    gap: 18px !important;
    flex-wrap: wrap !important;
    margin-bottom: 10px !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card-items {
    margin: 10px 0 16px 0 !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card-items ul {
    margin: 6px 0 0 22px !important;
    padding: 0 !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-card-items li {
    margin: 0 0 5px 0 !important;
    line-height: 1.45 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

.wh-widerruf-form-select-order .wh-widerruf-order-selection-actions {
    flex: 0 0 auto !important;
    margin-top: 16px !important;
}

@media (max-width: 767px) {
    .wh-widerruf-modal {
        max-height: calc(100vh - 20px) !important;
    }

    .wh-widerruf-form-select-order {
        max-height: calc(100vh - 20px) !important;
    }

    .wh-widerruf-form-select-order .wh-widerruf-order-list {
        max-height: calc(100vh - 300px) !important;
    }
}
