/**
 * Password Generator Styles
 */

.password-generator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.password-generator-container h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
    text-align: center;
}

.password-output-section {
    margin-bottom: 2rem;
}

.password-output-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.password-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-input-group input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    transition: border-color 0.3s ease;
}

.password-input-group input[type="text"]:focus {
    outline: none;
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

.copy-btn, .refresh-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.copy-btn {
    background: #6c757d;
    color: white;
}

.copy-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.refresh-btn {
    background: #28a745;
    color: white;
}

.refresh-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.password-options {
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.length-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.length-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073ea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.length-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073ea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#length-value {
    font-weight: 600;
    color: #0073ea;
    min-width: 30px;
    text-align: center;
}

.character-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    position: relative;
}

.checkbox-item:hover {
    background: #f8fafc;
    transform: translateX(2px);
}

.checkbox-item:active {
    transform: translateX(0);
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.checkbox-item:hover .checkmark {
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    border-radius: 1px;
}

.checkbox-item input[type="checkbox"]:focus + .checkmark {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.checkbox-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    flex: 1;
}

/* Style text when checkbox is checked */
.checkbox-item input[type="checkbox"]:checked ~ .checkbox-label {
    color: #667eea;
    font-weight: 600;
}

.password-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.generate-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.generate-btn:first-child {
    background: #0073ea;
    color: white;
}

.generate-btn:first-child:hover {
    background: #0058b3;
    transform: translateY(-2px);
}

.generate-btn.secondary {
    background: #6c757d;
    color: white;
}

.generate-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.password-strength {
    margin-bottom: 1.5rem;
}

.password-strength label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.strength-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-fill.very-weak {
    background: #dc3545;
    width: 20%;
}

.strength-fill.weak {
    background: #fd7e14;
    width: 40%;
}

.strength-fill.medium {
    background: #ffc107;
    width: 60%;
}

.strength-fill.strong {
    background: #28a745;
    width: 80%;
}

.strength-fill.very-strong {
    background: #20c997;
    width: 100%;
}

#strength-text {
    font-weight: 600;
    min-width: 100px;
    text-align: right;
}

.password-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item {
    text-align: center;
    padding: 0.5rem;
}

.info-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
}

.multiple-passwords {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.multiple-passwords h4 {
    margin-bottom: 1rem;
    color: #333;
}

.password-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.password-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.password-strength-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.password-strength-badge.very-weak {
    background: #f8d7da;
    color: #721c24;
}

.password-strength-badge.weak {
    background: #fff3cd;
    color: #856404;
}

.password-strength-badge.medium {
    background: #d1ecf1;
    color: #0c5460;
}

.password-strength-badge.strong {
    background: #d4edda;
    color: #155724;
}

.password-strength-badge.very-strong {
    background: #d1e7dd;
    color: #0f5132;
}

.copy-password-btn {
    padding: 0.25rem 0.5rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-password-btn:hover {
    background: #5a6268;
}

.password-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1rem;
}

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

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

.password-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design */
@media (max-width: 768px) {
    .password-generator-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .password-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn, .refresh-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .password-controls {
        flex-direction: column;
    }
    
    .generate-btn {
        width: 100%;
        text-align: center;
    }
    
    .password-info {
        grid-template-columns: 1fr;
    }
    
    .password-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .password-text {
        text-align: center;
    }
    
    .password-strength-badge {
        align-self: center;
    }
    
    .copy-password-btn {
        align-self: center;
    }
}

/* Animation for refresh button */
.refresh-btn:hover .refresh-icon {
    animation: spin 1s linear infinite;
}

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