/**
 * Widerrufsbutton Styles
 */

/* Button Styling */
.widerruf-btn {
    display: inline-block;
    cursor: pointer;
    border: 2px solid;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 10px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.widerruf-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.widerruf-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Modal Overlay */
.widerruf-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Modal Content */
.widerruf-modal-content {
    background-color: #fff;
    margin: auto;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.widerruf-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widerruf-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.widerruf-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.widerruf-close:hover {
    color: #333;
}

/* Modal Body */
.widerruf-modal-body {
    padding: 25px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.widerruf-intro {
    background-color: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #007bff;
    margin-bottom: 25px;
}

.widerruf-intro p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Form Styling */
#widerruf-form h3 {
    font-size: 18px;
    margin: 25px 0 15px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#widerruf-form h3:first-of-type {
    margin-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #dc3545;
}

.form-group input.invalid:focus,
.form-group textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* Form Row (2 columns) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Checkbox Group */
.checkbox-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-top: 3px;
    cursor: pointer;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.btn-primary {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.widerruf-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.widerruf-success h3 {
    color: #28a745;
    margin: 0 0 15px;
    font-size: 24px;
}

.widerruf-success p {
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
}

.widerruf-success button {
    margin-top: 20px;
    background-color: #28a745;
}

/* Responsive */
@media (max-width: 768px) {
    .widerruf-modal-content {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .widerruf-modal-header {
        padding: 15px 20px;
    }
    
    .widerruf-modal-header h2 {
        font-size: 20px;
    }
    
    .widerruf-modal-body {
        padding: 20px;
    }
}

/* Accessibility */
.widerruf-modal:focus-visible,
.widerruf-btn:focus-visible,
.btn-primary:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}
