/**
 * Password Hash Generator Styles für WordPress
 * Mit hoher Spezifität gegen Theme-Konflikte
 */

/* Höhere Spezifität durch Container-Prefix */
div.password-hash-generator,
.password-hash-generator {
    max-width: 600px !important;
    margin: 2rem auto !important;
    padding: 2rem !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    box-sizing: border-box !important;
}

.password-hash-generator .password-hash-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 2px solid #f0f0f0 !important;
}

.password-hash-generator .hash-logo {
    max-width: 64px !important;
    max-height: 64px !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.password-hash-generator .password-hash-title {
    display: block !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.password-hash-generator .password-hash-content {
    margin-top: 1rem !important;
}

.password-hash-generator .password-hash-inputs {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.password-hash-generator .input-container {
    margin-bottom: 1.5rem !important;
}

.password-hash-generator .input-container:last-child {
    margin-bottom: 0 !important;
}

.password-hash-generator .input-field {
    margin-bottom: 0.5rem !important;
}

.password-hash-generator .input-field label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-weight: 500 !important;
    color: #555 !important;
    font-size: 0.9rem !important;
}

.password-hash-generator .form-input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem !important;
    border: 2px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
    min-height: 2.5rem !important;
    height: auto !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
}

/* Spezielle Regel für Select-Felder */
.password-hash-generator select.form-input {
    min-height: 2.8rem !important;
    height: auto !important;
    padding: 0.6rem 0.75rem !important;
    padding-right: 2.5rem !important;
    line-height: 1.6 !important;
    font-size: 1rem !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 0.7rem center !important;
    background-size: 0.65rem auto !important;
}

/* Select field hover and focus states */
.password-hash-generator select.form-input:hover {
    border-color: #007cba !important;
}

.password-hash-generator select.form-input:focus {
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2) !important;
    outline: none !important;
}

/* Select options styling */
.password-hash-generator select.form-input option {
    padding: 0.5rem !important;
    line-height: 1.4 !important;
    background: white !important;
    color: #333 !important;
    font-size: 1rem !important;
}

.password-hash-generator .form-input:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2) !important;
}

.password-hash-generator .form-input[readonly] {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.password-hash-generator .form-input.updated {
    border-color: #28a745 !important;
    animation: flashGreen 0.3s ease !important;
}

@keyframes flashGreen {
    0% { background-color: #d4edda; }
    100% { background-color: #f8f9fa; }
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    width: auto;
    margin: 0;
}

.checkbox-label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

.button-container {
    text-align: center;
    margin: 1.5rem 0;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.2;
}

.btn-primary {
    background-color: #007cba;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.copy-feedback {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.copy-feedback.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.copy-feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.password-hash-info {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 0 4px 4px 0;
}

.password-hash-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

.password-hash-info strong {
    color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .password-hash-generator {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .password-hash-title {
        font-size: 1.25rem;
    }
    
    .form-input {
        padding: 0.625rem;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
    
    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .password-hash-generator {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .password-hash-header {
        margin-bottom: 1.5rem;
    }
    
    .input-container {
        margin-bottom: 1.25rem;
    }
    
    .button-container {
        margin: 1.25rem 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .password-hash-generator {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .password-hash-title {
        color: #e2e8f0;
    }
    
    .input-field label {
        color: #cbd5e0;
    }
    
    .form-input {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-input:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 2px rgba(99, 179, 237, 0.2);
    }
    
    .form-input[readonly] {
        background-color: #2d3748;
        color: #a0aec0;
    }
    
    .password-hash-info {
        background-color: #2d3748;
        border-left-color: #63b3ed;
    }
    
    .password-hash-info p {
        color: #a0aec0;
    }
    
    .password-hash-info strong {
        color: #63b3ed;
    }
}

/* WordPress Admin Anpassungen */
.wp-admin .password-hash-generator {
    background: #fff;
    border: 1px solid #c3c4c7;
}

.wp-admin .btn-primary {
    background-color: #2271b1;
}

.wp-admin .btn-primary:hover {
    background-color: #135e96;
}

/* Integration mit WordPress Theme */
body.wordpress .password-hash-generator {
    font-family: inherit;
}

body.wordpress .password-hash-title {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}