/* ========================================
   CREDENTIAL STORAGE - CLEAN CSS
   Matches the main application style
   ======================================== */

/* ========== MODAL OVERLAY ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

/* ========== MODAL CONTENT ========== */
.modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========== MODAL HEADER ========== */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.close-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #111827;
    background-color: #f3f4f6;
}

/* ========== MODAL BODY ========== */
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    margin: 0 0 1rem 0;
    color: #6b7280;
    line-height: 1.6;
}

/* ========== MODAL FOOTER ========== */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #111827;
}

.btn:hover {
    background: #f9fafb;
    color: #3b82f6;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    color: #3b82f6;
}

/* ========== STORAGE OPTIONS ========== */
.storage-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.storage-option {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff;
}

.storage-option:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.storage-option input[type="radio"] {
    margin-right: 0.75rem;
}

.storage-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.option-header {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.option-description {
    margin-left: 1.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ========== PRIVATE BROWSING NOTICE ========== */
.credential-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.notice-content {
    display: flex;
    gap: 0.75rem;
}

.notice-icon {
    font-size: 1.25rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.notice-text {
    flex: 1;
}

.notice-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #78350f;
}

.notice-text p {
    margin: 0;
    color: #92400e;
    font-size: 0.875rem;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: #ffffff;
    color: #111827;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========== PASSWORD STRENGTH ========== */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #6b7280;
    transition: width 0.3s, background-color 0.3s;
}

.strength-fill.weak {
    width: 33%;
    background: #ef4444;
}

.strength-fill.fair {
    width: 50%;
    background: #f59e0b;
}

.strength-fill.good {
    width: 75%;
    background: #3b82f6;
}

.strength-fill.strong {
    width: 100%;
    background: #10b981;
}

.strength-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}
