/* Authentication Styles */

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    font-size: 14px;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.password-toggle-btn:focus {
    outline: none;
    color: var(--accent-color);
}

/* Password Strength Meter */
.password-strength-meter {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background-color: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background-color: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background-color: #10b981;
}

.password-strength-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.password-strength-text.weak {
    color: #ef4444;
}

.password-strength-text.medium {
    color: #f59e0b;
}

.password-strength-text.strong {
    color: #10b981;
}

/* Login Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.login-divider span {
    padding: 0 16px;
    font-weight: 500;
}

/* Login Section */
.login-section {
    margin-bottom: 16px;
}

.login-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Account Actions Section */
.account-actions-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.account-actions-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.account-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.account-action-row:last-child {
    margin-bottom: 0;
}

/* Authentication Status */
#settings-auth-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

/* Form Help Text */
.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Profile Info */
.profile-info {
    margin-top: 16px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.profile-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.profile-info i {
    color: var(--accent-color);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Profile Settings - Read-only fields */
.readonly-fields {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.readonly-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.readonly-field:not(:last-child) {
    /* border-bottom: 1px solid var(--border-color); */
    margin-bottom: 8px;
    padding-bottom: 12px;
}

.readonly-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.readonly-value-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.readonly-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: var(--border-color);
    /* margin: 24px 0; */
    margin-bottom: 24px;
}

/* Editable Section */
.editable-section {
    padding-bottom: 6px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

/* Account Actions */
.account-actions {
    padding-top: 0;
}

/* Buttons in a row */
.account-buttons-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Account action buttons - equal width in row */
.account-action-btn {
    flex: 1;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Button styling for account actions */
.btn-delete {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-divider {
        margin: 16px 0;
    }
    
    .login-section {
        margin-bottom: 12px;
    }
    
    .account-actions-section {
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .account-action-row {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 8px;
    }
    
    .account-action-row button {
        width: 100%;
    }
    
    .delete-action-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .delete-action-row button {
        width: 100%;
    }
    
    .delete-info {
        justify-content: center;
        text-align: center;
    }
    
    .editable-section {
        margin-bottom: 16px;
        padding-bottom: 4px;
    }
    
    .section-divider {
        margin-bottom: 16px;
    }
}

@media (max-height: 700px) {
    #login-modal .modal-body,
    #profile-settings-modal .modal-body {
        padding: 1rem 1.5rem;
    }
    
    .login-section {
        margin-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .login-divider {
        margin: 12px 0;
    }
    
    .account-actions-section {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .account-action-row {
        margin-bottom: 6px;
    }
}
