/* Widerrufsbutton - Frontend Styles */

/* Button */
.widerruf-button {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
    line-height: 1.4;
    font-family: inherit;
}

.widerruf-button:hover {
    opacity: 0.9;
    text-decoration: none;
}

.widerruf-button:active {
    transform: scale(0.98);
}

.widerruf-button--small {
    padding: 8px 16px;
    font-size: 13px;
}

.widerruf-button--medium {
    padding: 12px 24px;
    font-size: 15px;
}

.widerruf-button--large {
    padding: 16px 32px;
    font-size: 17px;
}

.widerruf-button--primary {
    background-color: #dc3545;
    color: #fff;
    font-size: 16px;
}

.widerruf-button--primary:hover {
    background-color: #c82333;
    color: #fff;
}

.widerruf-button--secondary {
    background-color: #6c757d;
    color: #fff;
    font-size: 14px;
}

.widerruf-button--secondary:hover {
    background-color: #5a6268;
    color: #fff;
}

.widerruf-button--danger {
    background-color: #dc3545;
    color: #fff;
    font-size: 16px;
}

.widerruf-button--danger:hover {
    background-color: #c82333;
    color: #fff;
}

/* Sticky Button */
.widerruf-button-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Form Wrapper */
.widerruf-form-wrapper {
    max-width: 640px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widerruf-form-wrapper h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.widerruf-info {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Fields */
.widerruf-field {
    margin-bottom: 20px;
}

.widerruf-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.widerruf-field .required {
    color: #dc3545;
}

.widerruf-field input[type="text"],
.widerruf-field input[type="email"],
.widerruf-field select,
.widerruf-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.widerruf-field input:focus,
.widerruf-field select:focus,
.widerruf-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.widerruf-field input.valid {
    border-color: #28a745;
}

.widerruf-field input.invalid {
    border-color: #dc3545;
}

.widerruf-field small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

.widerruf-field-status {
    display: block;
    margin-top: 4px;
    font-size: 13px;
}

.widerruf-field-status.success {
    color: #28a745;
}

.widerruf-field-status.error {
    color: #dc3545;
}

/* Items Section */
.widerruf-items-list {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.widerruf-items-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.widerruf-item-row {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

.widerruf-item-row:last-child {
    border-bottom: none;
}

.widerruf-item-row input[type="checkbox"] {
    flex-shrink: 0;
}

.widerruf-item-row img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.widerruf-item-info {
    flex: 1;
}

.widerruf-item-name {
    font-weight: 600;
    font-size: 14px;
}

.widerruf-item-meta {
    font-size: 12px;
    color: #888;
}

/* Error / Success Messages */
.widerruf-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.widerruf-success {
    text-align: center;
    padding: 20px;
}

.widerruf-success-icon {
    width: 60px;
    height: 60px;
    background-color: #28a745;
    color: #fff;
    font-size: 30px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.widerruf-reference {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 16px;
}

.widerruf-ref-number {
    font-family: monospace;
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
    display: block;
    margin-top: 5px;
}

/* Summary Table */
.widerruf-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.widerruf-summary-table th,
.widerruf-summary-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    font-size: 14px;
}

.widerruf-summary-table th {
    width: 40%;
    color: #555;
    font-weight: 600;
}

.widerruf-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.widerruf-items-table th,
.widerruf-items-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.widerruf-items-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Actions */
.widerruf-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.widerruf-hint {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.widerruf-privacy {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.widerruf-photos-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.widerruf-photos-list li {
    padding: 5px 0;
    font-size: 13px;
    color: #555;
}

/* Loading */
.widerruf-items-list .loading {
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Responsive */
@media (max-width: 640px) {
    .widerruf-form-wrapper {
        margin: 15px;
        padding: 20px;
    }

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

    .widerruf-actions .widerruf-button {
        width: 100%;
        text-align: center;
    }
}
