/**
 * Custom Account Manager Styles
 * Version: 1.0.0
 */

/* Container */
.custom-account-sections {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
}

/* Sektionen */
.cam-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 25px;
    margin-bottom: 20px;
}

.cam-section:hover {
    /* Hover-Effekt entfernt */
}

.cam-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    position: relative;
}

.cam-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
}

/* Formulare */
.cam-form {
    margin: 0;
}

.cam-form-group {
    margin-bottom: 18px;
}

.cam-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input-Felder */
.cam-form-group input[type="text"],
.cam-form-group input[type="email"],
.cam-form-group input[type="password"],
.cam-form-group input[type="url"],
.cam-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

.cam-form-group input:focus,
.cam-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.cam-form-group input:disabled {
    background-color: #f7f7f7;
    color: #999999;
    cursor: not-allowed;
    border-color: #d0d0d0;
}

.cam-form-group small {
    display: block;
    margin-top: 4px;
    color: #666666;
    font-size: 11px;
    font-style: italic;
    line-height: 1.3;
}

/* Textarea */
.cam-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkboxes */
.cam-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cam-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.cam-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

/* Buttons */
.cam-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cam-btn-primary {
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    color: #ffffff;
}

.cam-btn-primary:hover {
    background: linear-gradient(135deg, #005a87, #0085a8);
}

.cam-btn-primary:active {
    background: linear-gradient(135deg, #004a70, #007090);
}

/* Loading State */
.cam-btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.cam-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: cam-spin 1s linear infinite;
}

@keyframes cam-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.cam-message {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: none;
}

.cam-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cam-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cam-message.show {
    display: block;
    animation: cam-fadeIn 0.3s ease;
}

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

/* Password Strength Indicator */
.cam-password-strength {
    margin-top: 6px;
    height: 3px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.cam-password-strength::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.cam-password-strength.weak::before {
    width: 25%;
    background-color: #dc3545;
}

.cam-password-strength.fair::before {
    width: 50%;
    background-color: #ffc107;
}

.cam-password-strength.good::before {
    width: 75%;
    background-color: #17a2b8;
}

.cam-password-strength.strong::before {
    width: 100%;
    background-color: #28a745;
}

/* Login Required Message */
.cam-login-required {
    text-align: center;
    padding: 30px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    color: #6c757d;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-account-sections {
        padding: 0;
    }
    
    .cam-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .cam-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .cam-form-group {
        margin-bottom: 15px;
    }
    
    .cam-btn {
        width: 100%;
        padding: 12px;
        font-size: 13px;
    }
    
    .cam-checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .cam-section {
        padding: 12px;
    }
    
    .cam-form-group input,
    .cam-form-group textarea {
        font-size: 14px; /* Prevents zoom on iOS */
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cam-section {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .cam-section h3 {
        color: #f7fafc;
    }
    
    .cam-form-group input,
    .cam-form-group textarea {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .cam-form-group label {
        color: #cbd5e0;
    }
}
/* Verbesserte Message-Styles für neue Funktionen */

/* Global Messages */
.cam-global-message {
    animation: cam-slideIn 0.3s ease-out;
    transition: all 0.3s ease;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cam-global-message.success {
    border-left-color: #28a745;
}

.cam-global-message.error {
    border-left-color: #dc3545;
}

.cam-global-message.warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
    color: #856404;
}

.cam-global-message.info {
    border-left-color: #17a2b8;
    background-color: #d1ecf1;
    color: #0c5460;
}

.cam-message-icon {
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

/* Slide-in Animation für globale Nachrichten */
@keyframes cam-slideIn {
    from { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Verbesserte Field-Validierung */
.cam-form-group input.valid,
.cam-form-group textarea.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.cam-form-group input.invalid,
.cam-form-group textarea.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

/* Fokus-Verbesserungen */
.cam-form-group input:focus,
.cam-form-group textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2), 0 2px 4px rgba(0,0,0,0.1);
}

/* Verbesserte Password Strength */
.cam-password-strength {
    position: relative;
    margin-top: 8px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cam-password-strength::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    transition: all 0.5s ease;
    border-radius: 4px;
    position: relative;
}

.cam-password-strength::after {
    content: attr(title);
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cam-password-strength.weak::before {
    width: 25%;
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.cam-password-strength.weak::after {
    content: 'Schwach';
    color: #dc3545;
}

.cam-password-strength.fair::before {
    width: 50%;
    background: linear-gradient(90deg, #ffc107, #f39c12);
}

.cam-password-strength.fair::after {
    content: 'Akzeptabel';
    color: #ffc107;
}

.cam-password-strength.good::before {
    width: 75%;
    background: linear-gradient(90deg, #17a2b8, #3498db);
}

.cam-password-strength.good::after {
    content: 'Gut';
    color: #17a2b8;
}

.cam-password-strength.strong::before {
    width: 100%;
    background: linear-gradient(90deg, #28a745, #2ecc71);
}

.cam-password-strength.strong::after {
    content: 'Stark';
    color: #28a745;
}

/* AJAX Loading-Verbesserungen */
.cam-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.cam-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: cam-spin 0.8s linear infinite;
    color: #ffffff;
}

/* Hover-Effekte verbessern */
.cam-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cam-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Accessibility-Verbesserungen */
.cam-form-group label {
    cursor: pointer;
}

.cam-required::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* Focus-visible für Keyboard-Navigation */
.cam-btn:focus-visible,
.cam-form input:focus-visible,
.cam-form textarea:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Responsive Improvements */
@media (max-width: 480px) {
    .cam-global-message {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .cam-password-strength::after {
        font-size: 9px;
        top: -22px;
    }
}