/**
 * Kaffee Klar EU Withdrawal Button
 * Styles for the withdrawal form
 * EU Directive 2023/2673 Compliant
 */

/* Container */
.kk-withdrawal-container {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Card */
.kk-withdrawal-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

/* Header */
.kk-withdrawal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    padding: 40px 32px;
    text-align: center;
}

.kk-withdrawal-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.kk-withdrawal-icon svg {
    stroke: #fff;
}

.kk-withdrawal-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
}

.kk-withdrawal-subtitle {
    margin: 0;
    opacity: 0.8;
    font-size: 14px;
}

/* Info Box */
.kk-withdrawal-info-box {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    margin: 24px;
    border-radius: 8px;
}

.kk-info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.kk-info-content strong {
    display: block;
    margin-bottom: 4px;
    color: #0369a1;
}

.kk-info-content p {
    margin: 0;
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

/* Form */
.kk-withdrawal-form {
    padding: 0 32px 32px;
    position: relative;
}

/* Step Indicator */
.kk-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding-top: 8px;
}

.kk-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.kk-step.active {
    opacity: 1;
}

.kk-step-number {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
    transition: all 0.3s ease;
}

.kk-step.active .kk-step-number {
    background: #1a1a1a;
    color: #fff;
}

.kk-step-label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.kk-step-line {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 16px;
}

/* Form Steps */
.kk-form-step {
    display: none;
}

.kk-form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Groups */
.kk-form-group {
    margin-bottom: 20px;
}

.kk-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #1e293b;
}

.kk-form-group label .required {
    color: #dc2626;
}

.kk-form-group input[type="text"],
.kk-form-group input[type="email"],
.kk-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.kk-form-group input:focus,
.kk-form-group select:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.kk-form-group input::placeholder {
    color: #94a3b8;
}

.kk-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

/* Buttons */
.kk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.kk-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: #fff;
}

.kk-btn-primary:hover {
    background: linear-gradient(135deg, #333 0%, #444 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kk-btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.kk-btn-secondary:hover {
    background: #e2e8f0;
}

.kk-btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}

.kk-btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
}

.kk-btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kk-btn-arrow {
    font-size: 18px;
}

.kk-btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.kk-btn-group .kk-btn {
    flex: 1;
}

/* Confirmation Box */
.kk-confirmation-box {
    background: #fefce8;
    border: 2px solid #facc15;
    border-radius: 12px;
    padding: 24px;
}

.kk-warning-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef9c3;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    color: #854d0e;
}

.kk-warning-icon {
    font-size: 20px;
}

.kk-confirmation-box h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1e293b;
}

/* Order Summary */
.kk-order-summary {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.kk-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.kk-summary-row:last-child {
    border-bottom: none;
}

.kk-summary-row.kk-highlight {
    background: #f0fdf4;
    margin: 8px -16px -16px;
    padding: 12px 16px;
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}

.kk-summary-row.kk-highlight .kk-value {
    color: #16a34a;
    font-weight: 600;
}

.kk-label {
    color: #64748b;
    font-size: 14px;
}

.kk-value {
    font-weight: 500;
    color: #1e293b;
}

/* Checkbox */
.kk-checkbox-group {
    margin-top: 16px;
}

.kk-checkbox-label {
    display: flex;
    gap: 12px;
    cursor: pointer;
    align-items: flex-start;
}

.kk-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.kk-checkbox-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

/* Success Box */
.kk-success-box {
    text-align: center;
    padding: 20px 0;
}

.kk-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: #fff;
}

.kk-success-box h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1e293b;
}

.kk-success-box > p {
    color: #64748b;
    margin: 0 0 24px;
}

.kk-reference-box {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 10px;
    padding: 16px 24px;
    display: inline-block;
    margin-bottom: 24px;
}

.kk-reference-label {
    display: block;
    font-size: 12px;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kk-reference-value {
    font-size: 20px;
    font-weight: 700;
    color: #166534;
    font-family: monospace;
}

.kk-email-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #eff6ff;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.kk-email-icon {
    font-size: 24px;
}

.kk-email-notice p {
    margin: 0;
    color: #1e40af;
    font-size: 14px;
}

.kk-next-steps {
    text-align: left;
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.kk-next-steps h4 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #1e293b;
}

.kk-next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.kk-next-steps li {
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.kk-next-steps li:last-child {
    margin-bottom: 0;
}

/* Error Message */
.kk-error-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.kk-error-message::before {
    content: "⚠ ";
}

/* Loading Overlay */
.kk-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 16px;
}

.kk-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.kk-loading-overlay p {
    margin-top: 16px;
    color: #64748b;
    font-size: 14px;
}

/* Footer */
.kk-withdrawal-footer {
    text-align: center;
    padding: 24px 20px;
    color: #94a3b8;
    font-size: 13px;
}

.kk-withdrawal-footer p {
    margin: 4px 0;
}

.kk-withdrawal-footer a {
    color: #64748b;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .kk-withdrawal-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .kk-withdrawal-header {
        padding: 32px 24px;
    }

    .kk-withdrawal-header h2 {
        font-size: 20px;
    }

    .kk-withdrawal-form {
        padding: 0 20px 24px;
    }

    .kk-withdrawal-info-box {
        margin: 20px 16px;
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .kk-step-indicator {
        flex-wrap: wrap;
        gap: 8px;
    }

    .kk-step-line {
        display: none;
    }

    .kk-step {
        flex: 1;
        justify-content: center;
    }

    .kk-step-label {
        display: none;
    }

    .kk-btn-group {
        flex-direction: column;
    }

    .kk-confirmation-box {
        padding: 16px;
    }

    .kk-summary-row {
        flex-direction: column;
        gap: 4px;
    }

    .kk-reference-box {
        padding: 12px 16px;
    }

    .kk-reference-value {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .kk-withdrawal-container {
        max-width: 100%;
        margin: 0;
    }

    .kk-withdrawal-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .kk-btn,
    #kk-withdrawal-footer-btn {
        display: none !important;
    }
}
